Date : Sat, 05 Dec 2009 01:45:16 +0100
From : kortink@... (John Kortink)
Subject: Tube - I/O processor memory questions
On 04 Dec 2009 23:54:51 +0000, jgh@... (Jonathan Graham
Harston) wrote:
>> Message-ID: <qnigh5hurgk9pmobqt5slt2a3d9ta2oe61@...>
>
>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
Exactly. Any executable that doesn't return
when entered becomes the CAO. There's no
requirement whatsoever for a ROM header.
John Kortink
--
Email : kortink@...
Homepage : http://www.inter.nl.net/users/J.Kortink
Those who can, do. Those who can't, manage.