Date : Fri, 04 Dec 2009 23:54:51 +0000
From : jgh@... (Jonathan Graham Harston)
Subject: Tube - I/O processor memory questions
John Kortink wrote:
> Not least because it would be pretty silly to require
> applications to have a ROM header.
No, it would be pretty silly to not require an application to have
a ROM header, mainly, and importantly, so the Tube Client MOS can
tell what CPU it was targetted at.
Rick Murray wrote:
> Can anybody point to code that would provide a definitive answer?
.osCLI_IO
LDA #&02:JSR SendR2 :\ Send command &02 - OSCLI
JSR SendStringF8 :\ Send command string at &F8/9
.osCLI_Ack
JSR WaitR2 :\ Wait for acknowledgement
CMP #&80:BEQ LFA5C :\ Jump if code to be entered
PLA:RTS :\ Restore A and return
\ *GO - call machine code
\ -----------------------
.CmdGO
AND #&DF :\ Ignore case
CMP #ASC"O":BNE osCLI_IO :\ Not '*GO', jump to pass to Tube
JSR SkipSpaces1 :\ Move past any spaces
JSR ScanHex:JSR SkipSpaces :\ Read hex value and move past spaces
CMP #&0D:BNE osCLI_IO :\ More parameters, pass to Tube to deal with
TXA:BEQ LFA5C :\ If no address given, jump to current program
LDA &F0:STA &F6 :\ Set program start to address read
LDA &F1:STA &F7
.LFA5C
LDA &EF:PHA:LDA &EE:PHA :\ Save current program
JSR EnterCode
PLA:STA &EE:STA &F2 :\ Restore current program and
PLA:STA &EF:STA &F3 :\ set address top of memory to it
PLA:RTS :\ Return to caller
--
J.G.Harston - jgh@... - mdfs.net/User/JGH
...and Brutha said to Simony, "Where there is darkness we will make
a great light"