>SetAddrs/s 1.01 - Source for *SetLoad, *SetExec, *SetAddr  *SetLoad ( *SetExec 2" *SetAddr < (C) J.G.Harston F: P+"(L)oad, (E)xec, (A)ddr? "A$:A$=A$,1) ZDA$="L":A$="Load":A%=2 A$="E":A$="Exec":A%=3 A$="Addr":A%=3 dOSARGS=&FFDA:OSFILE=&FFDD nlptr=&A8:addr=&AA:tempY=&AE x mcode%:load%=&FFFF0900 P=0 1 O%=mcode%:P%=load% [OPT P*3+4 .ctrl EQUW 0 .syntax BRK:EQUB 220 CEQUS "Syntax: Set"+A$+" "+" ",A$="Addr"):BRK .start% LDA #1:LDY #0:LDX #lptr "JSR OSARGS:STY addr:STY addr+1 #LDA (lptr),Y:CMP #13:BEQ syntax +LDA lptr:STA ctrl:LDA lptr+1:STA ctrl+1 .skip_name *LDA (lptr),Y:INY:CMP #33:BCS skip_name CMP #13:BEQ syntax "DEY:JSR space2:BEQ syntax ,LDX #addr:JSR get_hex_addr 6JSR space2 @] J} A$="Addr":[OPT P*3:BEQ syntax:LDA addr+3:PHA:LDA addr+2:PHA:LDA addr+1:PHA:LDA addr+0:PHA:JSR get_hex_addr:JSR space2:] T [OPT P*3 ^BNE syntax h .got_addr rLDA addr+0:STA ctrl+A%*4-6 |LDA addr+1:STA ctrl+A%*4-5 LDA addr+2:STA ctrl+A%*4-4 LDA addr+3:STA ctrl+A%*4-3  .do_file +LDX #ctrl 255:LDY #ctrl 256:LDA #A% ]  A$="Addr":[OPT P*3:JSR OSFILE:PLA:STA ctrl+2:PLA:STA ctrl+3:PLA:STA ctrl+4:PLA:STA ctrl+5:LDX #ctrl 255:LDY #ctrl 256:LDA #2:]  [OPT P*3 JMP OSFILE : .get_hex_addr  LDA #0 #STA 0,X:STA 1,X:STA 2,X:STA 3,X  .nextchar LDA (lptr),Y:JSR asc_to_bin BCS gh_exit ASL A:ASL A:ASL A:ASL A &STY tempY:LDY #4 0 .gh_again :)ASL A:ROL 0,X:ROL 1,X:ROL 2,X:ROL 3,X DDEY:BNE gh_again N LDY tempY XINY:BNE nextchar b .gh_exit lRTS v.asc_to_bin CMP #48:BCC illegal CMP #58:BCC zero_nine  #&DF:CMP #71:BCS illegal  SBC #6 .zero_nine  #&0F:CLC:RTS .skpspc INY  .space2 LDA (lptr),Y:CMP #32 BEQ skpspc:CMP #13  .illegal  SEC:RTS EQUS "v1.01" ]: H"*SAVE Set"+A$+" ";~mcode%;" ";~O%;" ";~start%&FFFF0000;" ";~load%