Option ROM Programming: Difference between revisions

From Bitchin100 DocGarden
Jump to navigationJump to search
(New page: == Concept: Running BASIC code from OptROM == Fm: Stan Wong 70346,1267 To: Denny Thomas 76701,40 Paul's on the right track about the Basic interpreter. The Basic code never moves but th...)
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Concept: Running BASIC code from OptROM ==
[[Running BASIC Code from OptROM]]
 
Fm: Stan Wong 70346,1267
To: Denny Thomas 76701,40
 
Paul's on the right track about the Basic interpreter.  The Basic code never
moves but there is a rom call that interprets each tokenized statement.  Other
rom routines find the next statement to execute.  It's been a while but my
memory is sort of dim on the subject but each Basic statement in storage is
prefixed with the line line followed by the statement tokens followed by a
null.  Three nulls indicate the end of the program (end-of-statement null
followed by a line number of zero).
 
A small program could switch to the option rom, read a Basic line (tokenized)
into ram, switch back to system rom, and then feed it to the interpreter loop.
There is no housekeeping since Basic takes care of it.  Oops, I forgot, as part
of each line I believe that there is also the address of the next statement.
That needs to be fixed up also.  Anyway, it's a fairly starightforward
proposition.  If there is any interest I can dive back into my notes and
re-figure out what's what (in any case I got all my info from Robert
Covington's ROM maps in the DLs).

Latest revision as of 11:31, 22 February 2008