0 MODE7 10 REM Prints out A,X,Y for a vector 20 REM (C)1996 SPROW 30 DIM trap% 256 40 oswc=&FFEE 50 INPUT"Assemble at "loc$ 60 INPUT"Trap which vector? &"vector$:vector=EVAL("&"+vector$):IFvector<&200 THENGOTO60 70 loc%=EVAL(loc$) 80 FORX=4 TO 7 STEP3 90 O%=trap%:P%=loc% 100 [OPTX 110 .repoint 120 SEI 130 LDXvector:STXoldvec+1 140 LDYvector+1:STYoldvec+2 150 LDX#print MOD256:STXvector 160 LDY#print DIV256:STYvector+1 170 CLI:RTS 180 .print 190 PHP:PHA:LDA#ASC("["):JSRoswc:PLA:PHA:\Save status and print bracket 200 .pA 210 PHA:LDA#ASC("A"):JSRoswc:PLA:JSR hex:\Print A 220 .pX 230 LDA#ASC("X"):JSRoswc:TXA:JSR hex:\Print X 240 .pY 250 LDA#ASC("Y"):JSRoswc:TYA:JSR hex:\Print Y 260 .done 270 LDA#ASC("]"):JSRoswc:LDA#32:JSRoswc:PLA:PLP:\Close brackets & return 280 .oldvec 290 JMP&9999:\Self modifies when run 300 .hex 310 PHA:LSR A:LSR A:LSR A:LSR A:JSRconvert:PLA:AND #15:JSRconvert:RTS 320 .convert 330 SED:CMP #10:ADC #48:CLD:JMPoswc 340 ] 350 NEXT 360 OSCLI("SAVE OUTPUT "+STR$~(trap%)+" "+STR$~(O%)+" "+STR$~(loc%)+" "+STR$~(loc%))