From: ian Date: Sat, 23 Apr 2005 20:04:52 +0000 (+0000) Subject: add S actual arg in retfie_r, return_r, call_s; labels formal arg is n; support com_w... X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=dd29a07a9ea6c758b2f1a0477bf9ec8c2e0b4c5d;p=trains.git add S actual arg in retfie_r, return_r, call_s; labels formal arg is n; support com_w etc.; rcsid --- diff --git a/iwjpictest/Makefile b/iwjpictest/Makefile index 71c11fa..2e084d0 100644 --- a/iwjpictest/Makefile +++ b/iwjpictest/Makefile @@ -23,6 +23,6 @@ insn-%.txt: insn-aliases.inc-gen Makefile mv -f $@.1.tmp $@ insn-%.ps: insn-%.txt - atp -T A4 -B -f Courier8.2 <$< $o + atp -T A4 -B -f Courier7.8 <$< $o copybits.o serialloop.o: onecopybit.inc diff --git a/iwjpictest/insn-aliases.inc-gen b/iwjpictest/insn-aliases.inc-gen index 8477096..ee6faef 100755 --- a/iwjpictest/insn-aliases.inc-gen +++ b/iwjpictest/insn-aliases.inc-gen @@ -14,6 +14,7 @@ esac test $# = 1 || badusage w=0xfe8 +lab=n desc () { local use=$1 new=$2 formargs=$3 notes=$4 @@ -60,6 +61,7 @@ als_fda_1fw () { local use=$1 base=$2 ext=$3 actargs=$4 formargs=$5 als_fa $use ${base}f "$ext" $actargs,1 "$formargs" als_fa $use ${base}fw "$ext" $actargs,0 "$formargs" + alias_f $use ${base}w$ext $w$actargs,0,0 "$formargs" } als_k_lw () { local use=$1 base=$2 @@ -82,8 +84,8 @@ noalias () { } descs_bra () { local what=$1 flag=$2 - ds="Branch if $what"; alias_f b$flag bra_$flag l l 8R - ds="Branch if Not $what"; alias_f bn$flag bra_n$flag l l 8R + ds="Branch if $what"; alias_f b$flag bra_$flag $lab $lab 8R + ds="Branch if Not $what"; alias_f bn$flag bra_n$flag $lab $lab 8R } if $macros; then echo ' ; autogenerated - do not edit'; fi @@ -136,22 +138,22 @@ descs_bra Carry c descs_bra Negative n descs_bra Overflow ov descs_bra Zero z -ds='Branch unconditionally'; noalias bra l 11R -ds='Call subroutine'; noalias call l 20 -ds='Call subr., saving W,S,BSR'; alias_f call call_s l l 20 +ds='Branch unconditionally'; noalias bra $lab 11R +ds='Call subroutine'; noalias call $lab 20 +ds='Call subr., saving W,S,BSR'; alias_f call call_s $lab,1 $lab 20 ds='Clear watchdog timer'; noalias clrwdt ds='Decimal adjust'; alias_f daw da_w -ds='Jump unconditionally'; noalias goto l 20 +ds='Jump unconditionally'; noalias goto $lab 20 ds='No Operation'; noalias nop ds='Pop top of return stack'; noalias pop ds='Push PC+2 onto stack'; noalias push -ds='Branch to subroutine'; noalias rcall l 8R +ds='Branch to subroutine'; noalias rcall $lab 8R ds='Reset the microcontroller'; noalias reset ds="Return, reenabling Int's"; noalias retfie -ds="Return, ena.Int's, restoring W,S,BSR"; alias_f retfie retfie_r +ds="Return, ena.Int's, restoring W,S,BSR"; alias_f retfie retfie_r 1 ds='Return with literal in W'; noalias retlw ds='Return from subroutine'; noalias return -ds='Return, restoring W,S,BSR'; alias_f return return_r +ds='Return, restoring W,S,BSR'; alias_f return return_r 1 ds='Go into standby mode'; noalias sleep # `literal operations' (DS282) @@ -183,4 +185,5 @@ Notes: R Branch uses relative offset. also _a (always uses access bank) and _b (always uses BSR). (_[ab]_if for conditionals.) digits Gives number of bits of address or offset. +$Id$ #--0--