>Client/src ! Source for 6502 Tube Client * As supplied with Internal 6502 CoPro ( 2/ There are only three differences from the last error T &FF = Escape flag ^: h P=01 rP%=load%:O%=mcode% |[OPT P*3+4  .RESET  LDX #&00  .LF802 9LDA &FF00,X:STA &FF00,X :\ Copy entry block to RAM DEX:BNE LF802  LDX #&36  .LF80D 8LDA LFF80,X:STA USERV,X :\ Set up default vectors DEX:BPL LF80D -TXS:LDX #&F0 :\ Clear stack  .LF819 CLDA &FDFF,X:STA &FDFF,X :\ Copy &FE00-&FEEF to RAM, avoiding :DEX:BNE LF819 :\ Tube registers at &FEFx 5LDY #RESET 255:STY &F8 :\ Point to start of ROM LDA #RESET 256:STA &F9 9.LF82A :\ Copy rest of ROM to RAM &4LDA (&F8),Y:STA (&F8),Y :\ Copy a page to RAM 04INY:BNE LF82A :\ Loop for 256 bytes :8INC &F9:LDA &F9 :\ Inc. address high byte D:CMP #&FE:BNE LF82A :\ Loop from &F800 to &FDFF N LDX #&10 X .LF83B b8LDA LF859,X:STA &0100,X :\ Copy jump code to &100 lDEX:BPL LF83B v5LDA &EE:STA &F6 :\ Copy &EE/F to &F6/7 LDA &EF:STA &F7 3LDA #&00:STA &FF :\ Clear Escape flag ESTA &F2:LDA #&F8:STA &F3 :\ Set memtop to start of ROM at &F800 EJMP &0100 :\ Jump via low memory to page ROM out  ,\ Executed in low memory to page ROM out ,\ --------------------------------------  .LF859 FLDA TubeS1:CLI :\ Check Tube R1 status to page ROM out  .LF85D CJMP LF860 :\ Jump to initilise I/O with banner   .LF860 8JSR PrText :\ Display startup banner  PEQUB 10:EQUS "Acorn TUBE 65C102 Co-Processor" :\ ** Different from 6502 TUBE "EQUB 10:EQUB 10:EQUB 13:EQUB 0  NOP *@LDA #CmdOSLoop 255 :\ Next time RESET is soft entered, 44STA LF85D+1 :\ banner not printed >LDA #CmdOSLoop 256 HSTA LF85D+2 R6JSR WaitR2 :\ Wait for Acknowledge \copyright message ~\ \ Now check for &00,"(C)" @LDY #&00:LDA (&FD),Y:BNE LF8FA :\ Jump if no initial &00 8INY:LDA (&FD),Y:CMP #&28:BNE LF8FA :\ Jump if no '(' 8INY:LDA (&FD),Y:CMP #&43:BNE LF8FA :\ Jump if no 'C' 8INY:LDA (&FD),Y:CMP #&29:BNE LF8FA :\ Jump if no ')' \ \ &00,"(C)" exists 6LDY #&06:LDA (&EE),Y :\ Get ROM type < #&4F:CMP #&40:BCC NotLanguage :\ b6=0, not a language F #&0D:BNE Not6502Code :\ type<>0 and <>2, not 6502 code  .LF8FA =LDA #&01:JMP (&00F2) :\ Enter code with A=1 \  D\ Any existing error handler will probably have been overwritten 9\ Set up new error handler before generating an error .NotLanguage (=LDA #ErrorHandler 255:STA BRKV+0 :\ Claim error handler 2&LDA #ErrorHandler 256:STA BRKV+1 <3BRK:EQUB 0:EQUS "This is not a language":EQUB 0 F P.Not6502Code Z=LDA #ErrorHandler 255:STA BRKV+0 :\ Claim error handler d&LDA #ErrorHandler 256:STA BRKV+1 n3BRK:EQUB 0:EQUS "I cannot run this code":EQUB 0 x .ErrorHandler -LDX #&FF:TXS :\ Clear stack JSR OSNEWL:LDY #&01  .LF94D 4LDA (&FD),Y:BEQ LF957 :\ Print error string JSR OSWRCH:INY:BNE LF94D  .LF957 8JSR OSNEWL:JMP CmdOSLoop :\ Jump to command prompt  ,\ Control block for command prompt input ,\ --------------------------------------  .LF95D >EQUW INPBUF :\ Input text to INPBUF at &236 6EQUB &CA :\ Up to &CA characters 2EQUB &20:EQUB &FF :\ Min=&20, Max=&FF  " ,\ MOS ERFACE 6\ ============= @\ J\ T.\ OSWRCH - Send character to output stream ^.\ ======================================== h\ On entry, A =character r\ On exit, A =preserved |\ \ Tube data character -- \  .osWRCH 5BIT TubeS1 :\ Read Tube R1 status 3NOP:BVC osWRCH :\ Loop until b6 set ;STA TubeR1:RTS :\ Send character to Tube R1   3\ OSRDCH - Wait for character from input stream 3\ ============================================= &\ On exit, A =char, Cy=Escape flag \ $\ Tube data &00 -- Carry Char \  .osRDCH ;LDA #&00:JSR SendR2 :\ Send command &00 - OSRDCH &6.WaitCarryChar :\ Wait for Carry and A 00JSR WaitR2:ASL A :\ Wait for carry : .WaitR2 D=BIT TubeS2:BPL WaitR2 :\ Loop until Tube R2 has data N1LDA TubeR2 :\ Fetch character X.NullReturn bRTS l v \ Skip Spaces \ =========== .SkipSpaces1 INY .SkipSpaces (LDA (&F8),Y:CMP #&20:BEQ SkipSpaces1 RTS   \ Scan hex \ ========  .ScanHex 7LDX #&00:STX &F0:STX &F1 :\ Clear hex accumulator  .LF98C  7LDA (&F8),Y :\ Get current character ,CMP #&30:BCC LF9B1 :\ <'0', exit  >CMP #&3A:BCC LF9A0 :\ '0'..'9', add to accumulator *= #&DF:SBC #&07:BCC LF9B1:\ Convert letter, if <'A', exit 4,CMP #&40:BCS LF9B1 :\ >'F', exit > .LF9A0 H%ASL A:ASL A:ASL A:ASL A :\ *16 R:LDX #&03 :\ Prepare to move 3+1 bits \ .LF9A6 fstring .SendStringF8  LDY #&00  .LF9B8 7BIT TubeS2:BVC LF9B8 :\ Wait for Tube R2 free ;LDA (&F8),Y:STA TubeR2 :\ Send character to Tube R2 6INY:CMP #&0D:BNE LF9B8 :\ Loop until sent ?LDY &F9:RTS :\ Restore Y from &F9 and return  $ .\ - Execute command 8\ ======================= B"\ On entry, XY=>command string L\ On exit, XY= preserved V\ ` .osCLI j?PHA:STX &F8:STY &F9 :\ Save A, &F8/9=>command string t LDY #&00 ~ .LF9D1 JSR SkipSpaces:INY 5CMP #"*":BEQ LF9D1 :\ Skip spaces and stars : #&DF:TAX :\ Ignore case, and save in X 4LDA (&F8),Y :\ Get next character 3CPX #"G":BEQ CmdGO :\ Jump to check '*GO' @CPX #"H":BNE osCLI_IO :\ Not "H---", jump to pass to Tube 4CMP #".":BEQ CmdHELP :\ "H.", jump to do *Ǔ + #&DF :\ Ignore case ACMP #"E":BNE osCLI_IO :\ Not "HE---", jump to pass to Tube 4INY:LDA (&F8),Y :\ Get next character 5CMP #".":BEQ CmdHELP :\ "HE.", jump to do *Ǔ + #&DF :\ Ignore case BCMP #"L":BNE osCLI_IO :\ Not "HEL---", jump to pass to Tube 4INY:LDA (&F8),Y :\ Get next character 6CMP #".":BEQ CmdHELP :\ "HEL.", jump to do *Ǔ + #&DF :\ Ignore case (CCMP #"P":BNE osCLI_IO :\ Not "HELP---", jump to pass to Tube 24INY:LDA (&F8),Y :\ Get next character <+ #&DF :\ Ignore case FGCMP #"A":BCC CmdHELP :\ "HELP" terminated by non-letter, do *Ǔ PGCMP #"[":BCC osCLI_IO :\ "HELP" followed by letter, pass to Tube Z d&\ *Help - Display help information n&\ -------------------------------- x .CmdHELP 4JSR PrText :\ Print help message JEQUB 10:EQUB 13:EQUS "65C102 TUBE 1.10" :\ ** Different from 6502 TUBE EQUB 10:EQUB 13 HNOP :\ Continue to pass '*Ǔ' command to Tube   #\ - Send command line to host '\ ================================= %\ On entry, &F8/9=>command string \ /\ Tube data &02 string &0D -- &7F or &80 \ .osCLI_IO 6LDA #&02:JSR SendR2 :\ Send command &02 - >JSR SendStringF8 :\ Send command string at &F8/9 .osCLI_Ack ":JSR WaitR2 :\ Wait for acknowledgement ,&7F, X, Y, Carry=returned values v\ .osBYTE 7CMP #&80:BCS ByteHigh :\ Jump for long OSBYTEs \ !\ Tube data &04 X A -- X \ PHA:LDA #&04 .LFA7A 7BIT TubeS2:BVC LFA7A :\ Wait for Tube R2 free =STA TubeR2 :\ Send command &04 - OSBYTELO .LFA82 7BIT TubeS2:BVC LFA82 :\ Wait for Tube R2 free 7STX TubeR2:PLA :\ Send single parameter .LFA8B 7BIT TubeS2:BVC LFA8B :\ Wait for Tube R2 free /STA TubeR2 :\ Send function  .LFA93 ?BIT TubeS2:BPL LFA93 :\ Wait for Tube R2 data present *2LDX TubeR2:RTS :\ Get return value 4 > .ByteHigh H7CMP #&82:BEQ Byte82 :\ Read memory high word R7CMP #&83:BEQ Byte83 :\ Read bottom of memory \4CMP #&84:BEQ Byte84 :\ Read top of memory f\ p&\ Tube data &06 X Y A -- Cy Y X z\ PHA:LDA #&06 .LFAAB 7BIT TubeS2:BVC LFAAB :\ Wait for Tube R2 free =STA TubeR2 :\ Send command &06 - OSBYTEHI .LFAB3 7BIT TubeS2:BVC LFAB3 :\ Wait for Tube R2 free 2STX TubeR2 :\ Send parameter 1 .LFABB 7BIT TubeS2:BVC LFABB :\ Wait for Tube R2 free 2STY TubeR2 :\ Send parameter 2 PLA .LFAC4 7BIT TubeS2:BVC LFAC4 :\ Wait for Tube R2 free /STA TubeR2 :\ Send function ICMP #&8E:BEQ CheckAck :\ If select language, check to enter code 9CMP #&9D:BEQ LFAEF :\ Fast return with Fast $/PHA :\ Save function . .LFAD5 8?BIT TubeS2:BPL LFAD5 :\ Wait for Tube R2 data present B+LDA TubeR2:ASL A:PLA :\ Get Carry L .LFADF V?BIT TubeS2:BPL LFADF :\ Wait for Tube R2 data present `6LDY TubeR2 :\ Get return high byte j .LFAE7 t?BIT TubeS2:BPL LFAE7 :\ Wait for Tube R2 data present ~5LDX TubeR2 :\ Get return low byte  .LFAEF RTS  B.Byte84:LDX &F2:LDY &F3:RTS :\ Read top of memory from &F2/3 :.Byte83:LDX #&00:LDY #&08:RTS :\ Read bottom of memory E.Byte82:LDX #&00:LDY #&00:RTS :\ Return &0000 as memory high word    \ OSWORD - Various functions  \ ========================== \ On entry, A =function !\ XY=>control block \  .osWORD 6STX &F8:STY &F9 :\ &F8/9=>control block =TAY:BEQ RDLINE :\ OSWORD 0, jump to read line (PHA:LDY #&08 2 .LFB09 <9BIT TubeS2:BVC LFB09 :\ Loop until Tube R2 free F;STY TubeR2 :\ Send command &08 - OSWORD P .LFB11 Z9BIT TubeS2:BVC LFB11 :\ Loop until Tube R2 free d/STA TubeR2 :\ Send function n9TAX:BPL WordSendLow :\ Jump with functions<&80 xJLDY #&00:LDA (&F8),Y :\ Get send block length from control block LDA (&F8),Y:STA TubeR2 :\ Send byte from control block control block \ On exit, A =undefined ,\ Y =length of returned string &$\ Cy=0 ok, Cy=1 Escape 0\ :5\ Tube data &0A block -- &FF or &7F string &0D D\ N .RDLINE X;LDA #&0A:JSR SendR2 :\ Send command &0A - RDLINE b LDY #&04 l .LFB7E v7BIT TubeS2:BVC LFB7E :\ Wait for Tube R2 free 4LDA (&F8),Y:STA TubeR2 :\ Send control block 2DEY:CPY #&01:BNE LFB7E :\ Loop for 4, 3, 2 ?LDA #&07:JSR SendR2 :\ Send &07 as address high byte CLDA (&F8),Y:PHA :\ Get text buffer address high byte DEY  .LFB96 7BIT TubeS2:BVC LFB96 :\ Wait for Tube R2 free >STY TubeR2 :\ Send &00 as address low byte BLDA (&F8),Y:PHA :\ Get text buffer address low byte 3LDX #&FF:JSR WaitR2 :\ Wait for response 9CMP #&80:BCS RdLineEscape :\ Jump if Escape returned 8PLA:STA &F8:PLA:STA &F9 :\ Set &F8/9=>text buffer  LDY #&00  .RdLineLp  ?BIT TubeS2:BPL RdLineLp :\ Wait for Tube R2 data present :LDA TubeR2:STA (&F8),Y :\ Store returned character  1INY:CMP #&0D:BNE RdLineLp :\ Loop until *?LDA #&00:DEY:CLC:INX :\ Return A=0, Y=len, X=00, Cy=0 4RTS >: H.RdLineEscape R?PLA:PLA:LDA #&00 :\ Return A=0, Y=len, X=FF, Cy=1 \RTS f p z%\ OSARGS - Read info on open file %\ =============================== \ On entry, A =function *\ X =>data word in zero page \ Y =handle !\ On exit, A =returned value \ X preserved \ Y preserved \ <\ Tube data &0C handle block function -- result block \  .osARGS ;PHA:LDA #&0C:JSR SendR2 :\ Send command &0C - OSARGS  .LFBD2 9BIT TubeS2:BVC LFBD2 :\ Loop until Tube R2 free -STY TubeR2 :\ Send handle 0LDA &03,X:JSR SendR2 :\ Send data word $LDA &02,X:JSR SendR2 .LDA &01,X:JSR SendR2 8LDA &00,X:JSR SendR2 B/PLA:JSR SendR2 :\ Send function L5JSR WaitR2:PHA :\ Get and save result V3JSR WaitR2:STA &03,X :\ Receive data word `JSR WaitR2:STA &02,X jJSR WaitR2:STA &01,X tJSR WaitR2:STA &00,X ~filename !\ On exit, A =zero or handle \ 4\ Tube data &12 function string &0D -- handle (\ &12 &00 handle -- &7F \  .osFIND ;PHA:LDA #&12:JSR SendR2 :\ Send command &12 - OSFIND  /PLA:JSR SendR2 :\ Send function 9CMP #&00:BNE OPEN :\ If <>0, jump to do OPEN -PHA:TYA:JSR SendR2 :\ Send handle (OJSR WaitR2:PLA:RTS :\ Wait for acknowledge, restore regs and return 2 .OPEN control block \ On exit, A =result %\ control block updated \ &A\ Tube data &14 block string function -- result block 0\ : .osFILE D6STY &FB:STX &FA :\ &FA/B=>control block N;PHA:LDA #&14:JSR SendR2 :\ Send command &14 - OSFILE X LDY #&11 b .LFC5F l4LDA (&FA),Y:JSR SendR2 :\ Send control block v3DEY:CPY #&01:BNE LFC5F :\ Loop for &11..&02 DEY:LDA (&FA),Y:TAX control block *!\ On exit, A =returned value 4(\ control block updated >\ H<\ Tube data &16 block function -- block Carry result R\ \ .osGBPB f6STY &FB:STX &FA :\ &FA/B=>control block p;PHA:LDA #&16:JSR SendR2 :\ Send command &16 - OSGBPB z LDY #&0C  .LFC9A 4LDA (&FA),Y:JSR SendR2 :\ Send control block 3DEY:BPL LFC9A :\ Loop for &0C..&00 /PLA:JSR SendR2 :\ Send function  LDY #&0C  .LFCA8 8JSR WaitR2:STA (&FA),Y :\ Get control block back 3DEY:BPL LFCA8 :\ Loop for &0C..&00 3LDY &FB:LDX &FA :\ Restore registers >JMP WaitCarryChar :\ Jump to get Carry and result   .Unsupported "BRK:EQUB 255:EQUS "Bad":EQUB 0   $"\ OSWORD control block lengths ."\ ============================ 8.WordLengthsLo B'EQUB &00:EQUB &05:EQUB &00:EQUB &05 L]EQUB &04:EQUB &05:EQUB &08:EQUB &0E :\ ** Different, 6502 TUBE sends only 2 bytes for =IO V'EQUB &04:EQUB &01:EQUB &01:EQUB &05 `'EQUB &00:EQUB &01:EQUB &20:EQUB &10 j'EQUB &0D:EQUB &00:EQUB &04:EQUB &80 t.WordLengthsHi ~'EQUB &05:EQUB &00:EQUB &05:EQUB &00 'EQUB &05:EQUB &00:EQUB &00:EQUB &00 'EQUB &05:EQUB &09:EQUB &05:EQUB &00 'EQUB &08:EQUB &18:EQUB &00:EQUB &01 'EQUB &0D:EQUB &80:EQUB &04:EQUB &80   \ Interrupt Handler \ ================= .InterruptHandler >STA &FC:PLA:PHA :\ Save A, get flags from stack ; #&10:BNE BRKHandler :\ If BRK, jump to BRK handler after BRK opcode n8PLA:TAX:LDA &FC :\ Restore X, get saved A xECLI:JMP (BRKV) :\ Restore IRQs, jump to Error Handler   ,\ Interrupt generated by data in Tube R1 ,\ --------------------------------------  .LFD18 @LDA TubeR1:BMI LFD39 :\ b7=1, jump to set Escape state 0TYA:PHA:TXA:PHA :\ Save registers >JSR LFE80:TAY :\ Get Y parameter from Tube R1 >JSR LFE80:TAX :\ Get X parameter from Tube R1 ?JSR LFE80 :\ Get event number from Tube R1 CJSR LFD36:PLA:TAX:PLA:TAY :\ Dispatch event, restore registers BLDA &FC:RTI :\ Restore A, return from interrupt  .LFD36 JMP (EVNTV)  .LFD39 9ASL A:STA &FF :\ Set Escape flag from b6 "BLDA &FC:RTI :\ Restore A, return from interrupt , 6,\ Interrupt generated by data in Tube R4 @,\ -------------------------------------- J .LFD3F T>LDA TubeR4:BPL LFD65 :\ b7=0, jump for data transfer ^CLI h .LFD45 r:BIT TubeS2:BPL LFD45 :\ Wait for data in Tube R2 |LDA TubeR2 BLDA #&00:STA ERRBUF:TAY :\ Store BRK opcode in error buffer 2JSR WaitR2:STA ERRBUF+1 :\ Get error number  .LFD59 BINY:JSR WaitR2 :\ Store bytes fetched from Tube R2 7STA ERRBUF+1,Y:BNE LFD59 :\ Loop until final zero GJMP ERRBUF :\ Jump to error block to generate error  0\ Data transfer initiated by IRQ via Tube R4 0\ ------------------------------------------  .LFD65 7LDA TubeS3: #&80:BPL LFDCF:\ Wait for Tube R3 free H .NMI6Addr R@LDA &FFFF,Y:STA TubeR3 :\ Fetch byte and send to Tube R3 \4INY:BNE LFDCF :\ Loop for 256 bytes f .LFDDF p7BIT TubeS3:BPL LFDDF :\ Wait for Tube R3 free z6STA TubeR3 :\ Send final sync byte  .LFDE7 >PLA:TAY:LDA &FC:RTI :\ Restore registers and return  %\ Read 256 bytes from Tube via R3 %\ -------------------------------  .LFDEC  LDY #&00  .LFDEE ?LDA TubeS3: #&80:BPL LFDEE:\ Wait for Tube R3 data present 9LDA TubeR3 :\ Fetch byte from Tube R3  .NMI7Addr CSTA &FFFF,Y:INY:BNE LFDEE :\ Store byte and loop for 256 bytes FBEQ LFDE7 :\ Jump to restore registers and return  /\ Transfer 0 - Transfer single byte to Tube /\ ----------------------------------------- $ .NMI0 .(PHA :\ Save A 8 .NMI0Addr B>LDA &FFFF:STA TubeR3 :\ Get byte and send to Tube R3 LLDA (&F6),Y:STA TubeR3 :\ Get byte and send to Tube R3 LDA (&F6),Y:STA TubeR3 :\ Get byte and send to Tube R3 <PLA:TAY:PLA:RTI :\ Restore registers and return  $\ Data transfer address pointers $\ ------------------------------  .LFE60 3EQUB (NMI0Addr+1) 255:EQUB (NMI1Addr+1) 255 ,EQUB &00F6 255 :EQUB &00F6 255 ,EQUB &00F6 255 :EQUB &00F6 255 3EQUB (NMI6Addr+1) 255:EQUB (NMI7Addr+1) 255 " .LFE68 ,3EQUB (NMI0Addr+1) 256:EQUB (NMI1Addr+1) 256 6,EQUB &00F6 256 :EQUB &00F6 256 @,EQUB &00F6 256 :EQUB &00F6 256 J3EQUB (NMI6Addr+1) 256:EQUB (NMI7Addr+1) 256 T ^%\ Data transfer routine addresses h%\ ------------------------------- r .LFE70 |&EQUB NMI0 255 :EQUB NMI1 255 &EQUB NMI2 255 :EQUB NMI3 255 )EQUB NMI_Ack 255:EQUB NMI_Ack 255 )EQUB NMI_Ack 255:EQUB NMI_Ack 255  .LFE78 &EQUB NMI0 256 :EQUB NMI1 256 &EQUB NMI2 256 :EQUB NMI3 256 )EQUB NMI_Ack 256:EQUB NMI_Ack 256 )EQUB NMI_Ack 256:EQUB NMI_Ack 256   B\ Wait for byte in Tube R1 while allowing requests via Tube R4 B\ ============================================================  .LFE80 FBIT TubeS1:BMI LFE94 :\ If data in Tube R1, jump to fetch it  .LFE85 BBIT TubeS4 :\ Check if data present in Tube R4 &NBPL LFE80 :\ If nothing there, jump back to check Tube R1 0BLDA &FC :\ Save IRQ's A store in A register :LPHP:CLI:PLP :\ Allow an IRQ through to process R4 request DQSTA &FC:JMP LFE80 :\ Restore IRQ's A store and jump back to check R1 N .LFE94 XDLDA TubeR1:RTS :\ Fetch byte from Tube R1 and return b l v\ Print embedded string \ ===================== .PrText 8PLA:STA &FA:PLA:STA &FB :\ &FA/B=>embedded string LDY #&00 .LFEA0 3INC &FA:BNE LFEA6:INC &FB :\ Increment address .LFEA6 =LDA (&FA),Y:BMI LFEB0 :\ Get character, exit if >&7F HJSR OSWRCH:JMP LFEA0 :\ Print character and loop back for more .LFEB0 @JMP (&00FA) :\ Jump back to code after string   !\ Null NMI code ! \ ------------- ! .NMI_Ack ! CSTA TubeR3:RTI :\ Store to TubeR3 to acknowlege NMI !* !4 !>\ Spare space !H\ =========== !REQUS &FEF0-P%,255) !\ !f !p\ I/O Space !z\ ========= !EQUS 8,0) ! !\ Tube I/O Registers !\ ================== !.TubeS1 :\ &FEF8 :EQUB 0 !.TubeR1 :\ &FEF9 :EQUB 0 !.TubeS2 :\ &FEFA :EQUB 0 !.TubeR2 :\ &FEFB :EQUB 0 !.TubeS3 :\ &FEFC :EQUB 0 !.TubeR3 :\ &FEFD :EQUB 0 !.TubeS4 :\ &FEFE :EQUB 0 !.TubeR4 :\ &FEFF :EQUB 0 ! " "\ Spare space "\ =========== "$ .LFF00 ".EQUS &FF80-P%,255) "8 "B "L\ AULT VECTOR TABLE "V\ ==================== "` .LFF80 "j)EQUW Unsupported :\ &200 - USERV "t(EQUW ErrorHandler :\ &202 - BRKV "~)EQUW IRQ1Handler :\ &204 - IRQ1V ")EQUW Unsupported :\ &206 - IRQ2V "(EQUW osCLI :\ &208 - CLIV ")EQUW osBYTE :\ &20A - BYTEV ")EQUW osWORD :\ &20C - WORDV ")EQUW osWRCH :\ &20E - WRCHV ")EQUW osRDCH :\ &210 - RDCHV ")EQUW osFILE :\ &212 - FILEV ")EQUW osARGS :\ &214 - ARGSV ")EQUW osBGET :\ &216 - BGetV ")EQUW osBPUT :\ &218 - BPutV ")EQUW osGBPB :\ &21A - GBPBV ")EQUW osFIND :\ &21C - FINDV #(EQUW Unsupported :\ &21E - FSCV # )EQUW NullReturn :\ &220 - EVNTV #(EQUW Unsupported :\ &222 - UPTV #(EQUW Unsupported :\ &224 - NETV #((EQUW Unsupported :\ &226 - VduV #2(EQUW Unsupported :\ &228 - KEYV #<(EQUW Unsupported :\ &22A - INSV #F(EQUW Unsupported :\ &22C - RemV #P(EQUW Unsupported :\ &22E - CNPV #Z)EQUW NullReturn :\ &230 - IND1V #d)EQUW NullReturn :\ &232 - IND2V #n)EQUW NullReturn :\ &234 - IND3V #x #).VECDEF :\ &FFB6 :EQUB &36:EQUW LFF80 #%.OSXXXX :\ &FFB9 :JMP Unsupported #%.OSXXXX :\ &FFBC :JMP Unsupported #%.OSXXXX :\ &FFBF :JMP Unsupported #%.OSXXXX :\ &FFC2 :JMP Unsupported #%.OSXXXX :\ &FFC5 :JMP Unsupported # .NVRDCH :\ &FFC8 :JMP osRDCH # .NVWRCH :\ &FFCB :JMP osWRCH # #!.OSFIND :\ &FFCE :JMP (FINDV) #!.OSGBPB :\ &FFD1 :JMP (GBPBV) #!.OSBPUT :\ &FFD4 :JMP (BPutV) #!.OSBGET :\ &FFD7 :JMP (BGetV) $!.OSARGS :\ &FFDA :JMP (ARGSV) $!.OSFILE :\ &FFDD :JMP (FILEV) $ $"!.OSRDCH :\ &FFE0 :JMP (RDCHV) $,).OSASCI :\ &FFE3 :CMP #&0D:BNE OSWRCH $6).OSNEWL :\ &FFE7 :LDA #&0A:JSR OSWRCH $@.OSWRCR :\ &FFFC :LDA #&0D $J!.OSWRCH :\ &FFFE :JMP (WRCHV) $T!.OSWORD :\ &FFF1 :JMP (WORDV) $^!.OSBYTE :\ &FFF4 :JMP (BYTEV) $h .OS_CLI :\ &FFF7 :JMP (CLIV) $r $|9.NMIV :\ &FFFA :EQUW NMI0 :\ NMI Vector $;.RESETV :\ &FFFC :EQUW RESET :\ RESET Vector $9.IRQV :\ &FFFE :EQUW InterruptHandler :\ IRQ Vector $]: $="Save Client "+~mcode%+" "+~O%+" "+~load%+" "+~load% $ : $ *Quit