> TubeSys/src 7 Source for System kernel for 65Tube Tube Emulator @ 65Tube client code with Atom/System Kernel MOS entry block (: 2G >&8000:ș "OS_GetEnv"A$:A$,5)<>"B6502":"B6502"+A$,A$," ")) <: Fload%=&F800: mcode% &900 P: Z/USERV=&200: BRKV=&202:IRQ1V=&204:IRQ2V=&206 d/ CLIV=&208:BYTEV=&20A:WORDV=&20C:WRCHV=&20E n/RDCHV=&210:FILEV=&212:ARGSV=&214:BGetV=&216 x/BPutV=&218:GBPBV=&21A:FINDV=&21C: FSCV=&21E /EVNTV=&220: UPTV=&222: NETV=&224: VduV=&226 / KEYV=&228: INSV=&22A: RemV=&22C: CNPV=&22E $IND1V=&230:IND2V=&232:IND3V=&234 : P=01 P%=load%:O%=mcode% [OPT P*3+4 \ &EE/F= 8\ &F0/1=>membot, if &F0<>0, membot=0000, memtop=0000 \ &F2/3=>command string \ &F4/5=>memtop 3\ &F6/7= readhex accumulator, ";params" pointer \ &F8/9=>control block *\ &FA/B=>String to print with PrString \ &FC = IRQ A store \ &FD/E=>last error "\ &FF = escape flag ,!\ &0236= command input buffer 64\ &03xx= bit16-bit23 of Turbo65 (zp),Y addresses @6\ &03F3= b16-b23 of (&F2),Y command string pointer J.\ &03F5= b16-b23 of (&F4),Y memtop pointer T5\ &03F9= b16-b23 of (&F8),Y control block pointer ^.\ &03FB= b16-b23 of (&FA),Y string pointer h-\ &03FE= b16-b23 of (&FD),Y error pointer r |\ Emulator opcodes  \ &03 - \ &13 - OSBYTE \ &23 - OSWORD \ &33 - OSWRCH \ &43 - OSRDCH \ &53 - OSFILE \ &63 - OSARGS \ &73 - OSBGET \ &83 - OSBPUT \ &93 - OSGBPB \ &A3 - OSFIND \ &B3 - Called by *Ș +\ &C3 - Called by *BASIC and OSBYTE 142  \ &D3  \ &E3  \ &F3 & 0 \ *OS - Enter command prompt : \ ========================== D .CmdOS N?JSR ErrorInit:JSR OSNEWL :\ Point BRKV to ErrorHandler XTYA:BNE JumpToCode :\ If Y<>0, enter code at XY v .CmdOSLoop 3JSR PrText :\ Display prompt EQUS "SYSTEM*":NOP  LDA #&00 LDX #LF84A 255 LDY #LF84A 256 4JSR osWORD:BCS OSEscape :\ Input a command 4LDX #&36:LDY #&02:JSR OS_CLI :\ Execute command :JMP CmdOSLoop :\ Jump back for another   \ *BASIC  \ ======  .CmdBASIC 1EQUB &C3 :\ Pass to host   \ NMI Handler  \ =========== *.NMIHandler 47LDY #&04:JSR OSByteA3 :\ Ask host something >ATYA:BEQ CmdOS :\ If Y=0, enter command prompt H.JumpToCode R;JMP EnterCodeXY :\ Y<>0, enter code at XY \ f .OSEscape p0LDA #&7E:JSR osBYTE :\ Ack. escape z!BRK:EQUB 17:EQUS "Escape":BRK   .LF84A 'EQUW &0236 :\ Input buffer at &0236 %EQUB &C9 :\ Max. &C9 characters #EQUB &20 :\ Minimum character #EQUB &FF :\ Maximum character   .RESET 0LDX #&FF:TXS :\ Clear stack HJSR LF87F :\ Reset vectors and set memory limits 7LDY #&06:JSR OSByteA3 :\ Ask host something CTYA:BNE OscliXY :\ If Y<>0, execute command at XY =\ If Y=0, display startup banner and enter command prompt %\ If Y<>0, XY=>command to execute  9JSR PrText :\ Print startup banner $)EQUB 10:EQUS "Acorn Atom/System Tube" .EQUB 10:EQUB 10:EQUB 13 8NOP B;JMP CmdOS :\ Jump to command prompt L)\ Will then call display help banner, V1\ then calls OsByteA3,4 for any entry address ` j .OscliXY t9JSR ErrorInit :\ Set up error handler ~>JSR OS_CLI:JMP CmdQUIT :\ Execute command then quit  )\ Reset vectors and set memory limits )\ ===================================  .LF87F CLD:LDX #&35  .LF882 >LDA LFB87,X:STA &0200,X :\ Copy from default vectors DEX:BPL LF882 6STZ &FF:STZ &F0 :\ Clear escape flag HLDX #&08:STX &F1 :\ Set F0/1=>bottom of memory at &0800 -LDX #&00:LDY #&F8 :\ XY=&F800 ESTX &F4:STY &F5 :\ Set F4/5=>top of memory at &F800 RTS   \ Interupt handler \ ================ (.InterruptHandler 2=STA &FC:PLA:PHA :\ Save A, get flags from stack <: #&10:BNE BRKHandler :\ If BRK, jump to BRK handler F;JMP (IRQ1V) :\ Continue via IRQ1V handler P Z.IRQ1Handler dFJMP (IRQ2V) :\ No handlers, pass staight on to IRQ2V n x.BRKHandler *TXA:PHA :\ Save X :TSX:LDA &0103,X :\ Get address from stack CLD:SEC:SBC #&01:STA &FD ;LDA &0104,X:SBC #&00:STA &FE :\ &FD/E=>after BRK opcode JLDA #&00:STA &03FE :\ Error block at (&FD),Y is in block &00 :PLA:TAX:LDA &FC :\ Restore X, get saved A JCLI:JMP (BRKV) :\ Restore IRQs and jump to Error Handler  \ Default error handler \ ===================== .ErrorHandler /LDX #&FF:TXS :\ Clear stack JINX:STX &03FE :\ Error block at (&FD),Y is in block &00 CLI:JSR OSNEWL  LDY #&01  .LF8D7 "6LDA (&FD),Y:BEQ LF8E1 :\ Print error string ,JSR OSWRCH:INY:BNE LF8D7 6 .LF8E1 @:JSR OSNEWL:JMP CmdOSLoop :\ Jump to command prompt J T \ *Ș ^ \ ===== h .CmdQUIT r0EQUB &B3 :\ Pass to host |  .OSByteA3 2LDA #&A3:LDX #&F3 :\ OSBYTE &A3,&F3 /EQUB &13 :\ Host OSBYTE RTS  \ Scan hex \ ========  .ScanHex 9LDX #&00:STX &F6:STX &F7 :\ Clear hex accumulator ESTX &03F3 :\ String at (&F2),Y is in block &00  .LF8F7 9LDA (&F2),Y :\ Get current character .SEC:SBC #&30:BCC LF921 :\ <'0', exit @CMP #&0A:BCC LF90E :\ '0'..'9', add into accumator > #&DF:SBC #&07 :\ Ignore case, convert letters .CMP #&0A:BCC LF921 :\ <'A', exit &.CMP #&10:BCS LF921 :\ >'F', exit 0 .LF90E :'ASL A:ASL A:ASL A:ASL A :\ *16 D LDX #&03 N .LF914 X>ASL A:ROL &F6:ROL &F7 :\ Move bits into accumulator b=BCS LF959 :\ Overflowed, jump to error l6DEX:BPL LF914 :\ Loop for four bits v:INY:BNE LF8F7 :\ Move to next character  .LF921 GJMP SkipSpaces :\ Skip past any final spaces and exit  $\ Scan hex, error if null string  .LF924 2JSR ScanHex:PHP :\ Save flag LCPX #&00:BEQ LF959 :\ X=0, nothing read in, 'Bad number' error 6PLP:RTS :\ Get flag back  \ * - Set address \ ========================  .CmdPAGE BJSR SkipSpaces:BEQ LF94A :\ No parameters, jump to use &0800 :JSR LF924:BNE LF959 :\ Error if more parameters  PLDY &F7:LDX &F6:BNE LF94E :\ addr<>&xx00, error as must by 256-byte aligned >CPY #&08:BCC LF94E :\ addr<&0800, error as too low  ?CPY #&80:BCS LF94E :\ addr>&8000, error as too high * .LF946 43STY &F1:CLC:RTS :\ Store high byte > .LF94A H2LDY #&08:BRA LF946 :\ Default to &0800 R \ .LF94E fBRK p2BRK:EQUS "Bad PAGE":BRK :\ Unusable value z .LF959 BRK )BRK:EQUS "Bad number":BRK :\ Bad hex  .LF966 :SEC:RTS :\ SEC=pass command to host  \ *GO - Call machine code \ =======================  .CmdGO FJSR SkipSpaces:BEQ LF984 :\ If no params, re-enter existing code 4JSR ScanHex :\ Scan hex parameter @CPX #&00:BEQ LF966 :\ No hex parameter, pass to host . :\ eg *GO HELLO %CMP #&3B:BEQ LF97C :\ ';' 8CMP #&0D:BNE LF959 :\ More parameters, error  .LF97C 9LDX &F6:LDY &F7 :\ Store parameter pointer $2 :\ Enter code at XY . 8.EnterCodeXY B=STX &F4:STY &F5 :\ Set memtop to entry address L .LF984 V6LDA &EF:PHA:LDA &EE:PHA :\ Save current program `JSR EnterCode jMPLA:STA &EE:STA &F4 :\ Restore current program and also set memtop tPLA:STA &EF:STA &F5 ~2CLC:RTS :\ CLC=command done  2\ Check if code to be entered has a ROM header .EnterCode DLDA &F4:STA &EE :\ Current program starts at memtop LDA &F5:STA &EF JLDX #&00:STX &03F5:STX &03FE :\ Set memtop and errptr are in block &00 8LDY #&07:LDA (&F4),Y :\ Get copyright offset CLD:CLC:ADC &F4:STA &FD copyright message \ Check for &00,"(C)" ?LDY #&00:LDA (&FD),Y:BNE LF9FC :\ Check for initial &00 7INY:LDA (&FD),Y:CMP #&28:BNE LF9FC :\ Check for '(' 7INY:LDA (&FD),Y:CMP #&43:BNE LF9FC :\ Check for 'C' 7INY:LDA (&FD),Y:CMP #&29:BNE LF9FC :\ Check for ')' \ &00,"(C)" exists 0LDY #&06:LDA (&F4),Y :\ Get ROM type (6 #&4D:CMP #&40:BCC LFA2A :\ b6=0, Not a language 2A #&0D:BEQ LF9E6 :\ code=%x1xx00x0, enter 6502 code %x1xx00x1, not 6502 code F .LF9E6 P&\ romtype=%0000 - A=0 - 6502 BASIC Z%\ romtype=%0001 - A=1 - Turbo6502 d)\ romtype=%0010 - A=0 - 6502 nonBASIC n$\ romtype=%0011 - A=1 - reserved x?PHA:LDY #&09 :\ Save entry value &00 or &01 .LF9E9 3LDA (&F4),Y:BEQ LF9F3 :\ Print ROM title JSR OSWRCH:INY:BNE LF9E9 .LF9F3 1JSR OSNEWL:JSR OSNEWL :\ Print two NLs 8PLA:BRA LF9FE :\ Get entry value back D.LF9FC :\ No (C) string, enter as raw code .LDA #&00 :\ Set flag=0 .LF9FE 5STA &F0 :\ Store flag at &F0 +\ If flag=0, membot=&F0/1, memtop=&F4/5 *\ If flag<>0, membot=0000, memtop=0000 LDY #&00:TYA  .LFA03 DSTA &0300,Y:DEY:BNE LFA03 :\ All (zp),Y accesses to block &00 7LDA #&01:JMP (&00F4) :\ Enter code with A=1 " , .LFA0E 6JSR ErrorInit @BRK J)BRK:EQUS "I cannot run this code":BRK T .LFA2A ^JSR ErrorInit hBRK r)BRK:EQUS "This is not a language":BRK | .ErrorInit 4LDA #ErrorHandler 255:STA BRKV+0 :\ Claim BRKV &LDA #ErrorHandler 256:STA BRKV+1 RTS  \ *Ǔ - Display help \ ==================== .CmdHELP 2JSR SkipSpaces:BNE LFA5C :\ Exit if parameters 6JSR OSNEWL:JSR HelpBanner:\ Display startup banner .LFA5C ;SEC:RTS :\ Return, SEC to pass to host  .HelpBanner JSR PrText .EQUS "6502 Emulator OS 0.64 (19 Oct 1988)" &EQUB 10:EQUB 13 0NOP :RTS D N#.osBYTE :\ OSBYTE XPHA b0CMP #&82:BEQ BYTE82 :\ Read memory high word l0CMP #&83:BEQ BYTE83 :\ Read bottom of memory v-CMP #&84:BEQ BYTE84 :\ Read top of memory =CMP #&85:BEQ BYTE85 :\ Read top of memory for screen mode )CMP #&8E:BEQ BYTE8E :\ Enter language 9CMP #&A3:BNE BYTEnn :\ Jump if not Application OSBYTE (CPX #&FE:BCC BYTEnn :\ Jump if X<&FE 9\ OSBYTE &A3,&FE and OSBYTE &A3,FF - return unchanged PLA RTS  ..BYTEnn :\ Pass OSBYTE to host #EQUB &13 :\ MOS_BYTE !PLA:RTS :\ Return  0.BYTE82 :\ Read memory high word *LDX #&00:LDY #&00 :\ High word=&0000 PLA:RTS  0.BYTE83 :\ Read bottom of memory *%PLA :\ Get A back 4:LDX &F0:BEQ LFABC :\ If &F0=0, &F0/F1=>memory bottom >$LDA #&01 :\ Set A=&01 H5LDX #&00:LDY #&00 :\ Return memory bottom=&0000 RRTS \ .LFABC f8LDX #&00:LDY &F1 :\ Get memory bottom from &F0/F1 pRTS z -.BYTE84 :\ Read top of memory %PLA :\ Get A back 6LDX &F0:BEQ LFACD :\ If &F0=0, &F4/5=>memory top $LDA #&04 :\ Set A=&04 2LDX #&00:LDY #&00 :\ Return memory top=&0000 RTS .LFACD 5LDX &F4:LDY &F5 :\ Get memory top from &F4/F5 RTS  8.BYTE85 :\ Read top of memory for screem 5LDX #&00:LDY #&80 :\ Return top of memory=&8000 /PLA:RTS :\ Restore A and return  ).BYTE8E :\ Enter language .JMP CmdBASIC :\ Jump to enter BASIC $ . .osBGet 8.EQUB &73 :\ Pass OSBGet to host BRTS L V .osBPut `.EQUB &83 :\ Pass OSBPut to host jRTS t ~ .osFILE .EQUB &53 :\ Pass OSFILE to host RTS   .osFIND .EQUB &A3 :\ Pass OSFIND to host RTS   .osGBPB .EQUB &93 :\ Pass OSGBPB to host RTS   .osRDCH .EQUB &43 :\ Pass OSRDCH to host  RTS   .osWRCH (.EQUB &33 :\ Pass OSWRCH to host 2RTS < F$.osWORD :\ OSWORD P7CMP #&05:BNE LFB0C :\ Jump if not Read I/O memory Z: d \ OSWORD 5 - Read I/O memory n\ Reads from Tube memory x0STX &F8:STY &F9 :\ &F8/9=>control block ALDY #&00:STY &03F9 :\ Control block at (&F8),Y in block &00 LDA (&F8),Y:STA &FA INY 1LDA (&F8),Y:STA &FB :\ &FA/B=address to read -LDX #&00:LDA (&FA,X) :\ Read from address embedded string BLDY #&00:STY &03FB :\ String at (&FA),Y is in block &00 INY  .LFB4A .LDA (&FA),Y :\ Get character &,CMP #&EA:BEQ LFB56 :\ Exit if NOP 0=JSR OSWRCH:INY:BNE LFB4A :\ Print char and loop for next : .LFB56 DTYA:CLC:ADC &FA N6TAX:LDA #&00:ADC &FB :\ Update return address X4PHA:TXA:PHA :\ Points after string b.NullReturn lRTS v \ Print string at XY \ ------------------  .PrString 2STX &FA:STY &FB :\ Store XY in &FA/B BLDY #&00:STY &03FB :\ String at (&FA),Y is in block &00  .LFB6C 0LDA (&FA),Y :\ Get a character 5CMP #&20:BCC LFB78 :\ Exit at control char 0JSR OSWRCH:INY:BNE LFB6C :\ Print character  .LFB78 RTS  .Unsupported BRK  BRK:EQUS "Unsupported":BRK   \ Default vectors * .LFB87 4)EQUW Unsupported :\ &200 - USERV >(EQUW ErrorHandler :\ &202 - BRKV H)EQUW IRQ1Handler :\ &204 - IRQ1V R)EQUW Unsupported :\ &206 - IRQ2V \(EQUW osCLI :\ &208 - CLIV f)EQUW osBYTE :\ &20A - BYTEV p)EQUW osWORD :\ &20C - WORDV z)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 NullReturn :\ &222 - UPTV (EQUW NullReturn :\ &224 - NETV (EQUW Unsupported :\ &226 - VduV (EQUW Unsupported :\ &228 - KEYV (EQUW Unsupported :\ &22A - INSV (EQUW Unsupported :\ &22C - RemV (EQUW Unsupported :\ &22E - CNPV $)EQUW NullReturn :\ &230 - IND1V .)EQUW NullReturn :\ &232 - IND2V 8)EQUW NullReturn :\ &234 - IND3V B L.osCLI :\ V2STX &F2:STY &F3 :\ &F2/3=>command string `>LDY #&00:STY &03F3 :\ String at (&F2),Y is in block &00 j .LFBC6 tCLDA (&F2),Y:STA LFC6A,Y :\ Copy command line to command buffer ~/CMP #&0D:BEQ LFBD3 :\ Loop until =INY:BNE LFBC6 :\ Loop for up to 256 characters  .LFBD2 3RTS :\ No found, exit  .LFBD3 LDX #LFC6A 255 8LDY #LFC6A 256 :\ Point XY to command buffer =STX &F2:STY &F3 :\ Point &F2/3 to command buffer LDX #&00:LDY #&FF  .LFBDF 9JSR SkipSpaces1 :\ Move past and skip spaces ,CMP #"*":BEQ LFBDF :\ Skip past '*'s 1CMP #&0D:BEQ LFBD2 :\ Null string, exit /CMP #"|":BEQ LFBD2 :\ *|, comment, exit  ICLC:TYA:ADC &F2:STA &F2 :\ Adjust &F2/3 to point to start of command BCC LFBF8:INC &F3  .LFBF8 (3LDY #&00:LDA (&F2),Y :\ Get first character 28CMP #".":BEQ LFC45 :\ '*.', jump to pass to host < .LFC00 F4TYA:PHA :\ Save command pointer P4JSR SkipSpaces :\ Skip any more spaces Z .LFC05 d?LDA LFF02,X:BMI LFC20 :\ Jump if at end of command table n8 (&F2),Y :\ Compare with command table x; #&DF:BNE LFC14 :\ Ignore case, jump if no match 0 from / :\ Osbyte 163,&F3  .LFC4A RTS   .LFC4B 8LDA LFC5E+1,X:PHA :\ Stack address high byte 7LDA LFC5E+0,X:PHA :\ Stack address low byte 0RTS :\ Jump to routine  .SkipSpaces1 &INY 0.SkipSpaces :(LDA (&F2),Y:CMP #&20:BEQ SkipSpaces1 DCMP #&0D:RTS N X\ Command addresses b\ ----------------- l .LFC5E vEQUW CmdBASIC-1 :\ *BASIC EQUW CmdQUIT-1 :\ *Ș EQUW CmdHELP-1 :\ *Ǔ EQUW CmdGO-1 :\ *GO EQUW CmdOS-1 :\ *OS EQUW CmdPAGE-1 :\ *  \ command buffer \ --------------------  .LFC6A EQUS 128,0) EQUS 128,0)   .LFD6A  BRK:BRK  .LFD6C  STZ &C0  #&00 *CLC 4RTS > H)\ This looks like a bit of BASIC code R)\ ----------------------------------- \ .LFD72 fLDA &0B:STA &19 pLDA &0C:STA &1A zLDA &0A:STA &1B  .LFD7E LDY &1B:INC &1B LDA (&19),Y CMP #&20:BEQ LFD7E CMP #&3D:BEQ LFDBA  .LFD8C BRK EQUB &04:EQUS "Mistake"  .LFD95 BRK  EQUB &10:EQUS "Syntax error"  .LFDA3 BRK  EQUB &0D:EQUS "No ":EQUB &F2  .LFDA9 BRK $EQUB &11:EQUS "Escape" .BRK 8 B .LFDB2 L JSR &C742 VCMP #&3D:BNE LFD8C `RTS j t .LFDBA ~JSR &D5AF:TXA LDY &1B:BRA LFDDC LDY &1B:BRA LFDD4 TSX:CPX #&FC:BCS LFDA3  LDA &01FF:CMP #&F2:BNE LFDA3  LDY &0A  .LFDD4 DEY  .LFDD5 INY:LDA (&0B),Y CMP #&20:BEQ LFDD5  .LFDDC CMP #&3A:BEQ LFDE8 CMP #&0D:BEQ LFDE8  CMP #&8B:BNE LFD95  .LFDE8 CLC:TYA:ADC &0B:STA &0B (BCC LFDF2:INC &0C 2 .LFDF2 <LDY #&01:STY &0A FBIT &FF:BMI LFDA9 P .LFDFA ZRTS d n .LFDFB x JSR &D41A  LDA (&0B):CMP #&3A:BEQ LFDFA LDA &0C:CMP #&07:BEQ LFE2E "LDY #&01:LDA (&0B),Y:BMI LFE2E LDX &20:BEQ LFE1E #STA &2B:INY:LDA (&0B),Y:STA &2A  JSR &D4BF  .LFE1E  LDA #&03:CLC:ADC &0B:STA &0B BCC LFE29:INC &0C  .LFE29 LDY #&01:STY &0A  .LFE2D RTS   .LFE2E  JMP &C7FB " , .LFE31 6 JMP &C905 @ J .LFE34 TJSR &D5A3:BEQ LFE31 ^BPL LFE3E:JSR &CF38 h .LFE3E rLDY &1B:STY &0A:LDA &2A |"A &2B:A &2C:A &2D:BEQ LFE63 CPX #&8C:BEQ LFE53  .LFE50  JMP &C880   .LFE53  INC &0A  .LFE55 JSR &D392:BCC LFE50 JSR &F018:JSR &D43A  JMP &EF05   .LFE63  LDY &0A  .LFE65 "LDA (&0B),Y:CMP #&0D:BEQ LFE74 INY:CMP #&8B:BNE LFE65 &STY &0A:BEQ LFE55 0 .LFE74 : JMP &C82D D N .LFE77 XLDA &2A:CMP &21:LDA &2B bSBC &22:BCS LFE2D lLDA #&5B:JSR &F58A vJSR &D898:LDA #&5D JSR &F58A:  JMP &F584   .LFE91 JSR &F3EC:JSR &D6B7 TAY:JSR &CF52 JSR &F3D6:JSR &DCC4 LDA &2E: &3B:BPL LFEBF ASL &2E:BRA LFEE1   .LFEAB STY &2D:PLA:STA &2C PLA:STA &2B PLA:STA &2A  JSR &BA3A LDA &3B: #&80:STA &3B  .LFEBF *LDA &3C:CMP &30:BNE LFEDD 4LDA &3D:CMP &31:BNE LFEDD >LDA &3E:CMP &32:BNE LFEDD HLDA &3F:CMP &33:BNE LFEDD RLDA &40:SBC &34:BEQ LFEE3 \ .LFEDD fROR A: &3B:ROL A p .LFEE1 z LDA #&FF  .LFEE3 RTS   .LFEE4  JMP &C905   .LFEE7 INC &1B:TXA:BEQ LFF2C  BMI LFE91 LDA &2A:PHA LDA &2B:PHA LDA &2C:PHA LDA &2D:PHA JSR &D6B7:TAY:BMI P%+29   .LFF00 $EQUW LFF17 .\ Command table 8 .LFF02 BEQUS "GO" :EQUB &C3 LEQUS "HELP" :EQUB &82 VEQUS "OS" :EQUB &84 `EQUS "PAGE" :EQUB &C5 jEQUS "QUIT" :EQUB &81 t .LFF17 ~EQUS "BASIC":EQUB &80  EQUB &00  EQUS &FF2C-P%,0)  .LFF2C  EQUS &FFB6-P%,0) '.VECDEF :EQUB &36:EQUW LFB87 #.LFFxx :JMP Unsupported #.LFFxx :JMP Unsupported #.LFFxx :JMP Unsupported #.LFFxx :JMP Unsupported %\.LFFxx :\JMP Unsupported   \ Atom/System Entry Block \ ----------------------- \.NVRDCH :JMP osRDCH (\.NVWRCH :JMP osWRCH 2 <.OSSHUT :JMP (FINDV) F.OSFIND :JMP (FINDV) P.OSBPUT :JMP (BPutV) Z.OSBGET :JMP (BGetV) d.OSSTAR :JMP (ARGSV) n.OSRDAR :JMP (ARGSV) x.OSSAVE :JMP (FILEV) .OSLOAD :JMP (FILEV)  !\.OSFIND :\JMP (FINDV) !\.OSGBPB :\JMP (GBPBV) !\.OSBPUT :\JMP (BPutV) !\.OSBGET :\JMP (BGetV) !\.OSARGS :\JMP (ARGSV) !\.OSFILE :\JMP (FILEV)  .OSRDCH :JMP (RDCHV) .OSECHO :JSR OSRDCH '.OSASCI :CMP #&0D:BNE OSWRCH '.OSNEWL :LDA #&0A:JSR OSWRCH .OSPRCR :LDA #&0D .OSWRCH :JMP (WRCHV) !\.OSWORD :\JMP (WORDV) "!\.OSBYTE :\JMP (BYTEV) ,.OS_CLI :JMP (CLIV) 6 @#.NMIV :EQUW NMIHandler J.RESETV :EQUW RESET T).IRQV :EQUW InterruptHandler ^]: h?"Save 65Kernel "+~mcode%+" "+~O%+" "+~load%+" "+~load% r : | *Quit :  OSBYTE &A3,&F3  Y= 7 4 - RESET, *OS, NMIHandler. Request code to enter : 6 - RESET occured, request command string to execute