[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: USR() SCRN?
Steve Nickolas wrote:
The methodology for handling USR applies the same to EHBASIC (where I intend
to use it) and FPBASIC (which is the dominant BASIC interpreter around these
parts), so perhaps someone knows. I want to implement SCRN( as a USR
function (so as not to have to muddle with the token table again),
You might consider leaving a little space between the command tokens
and the function tokens so that you could add a few tokens at the
end of the commands or functions without changing the existing tokens.
but every
way I am attempting to implement it is causing me a Syntax Error.
USR() is a function that takes one FP argument and delivers one FP
result.
The code in FPBASIC is:
DEF9: 20 B1 00 screen: jsr chrget
DEFC: 20 EC F1 jsr plotfns ; get column and row
DEFF: 8A txa ; row
DF00: A4 F0 ldy first ; column
DF02: 20 71 F8 jsr scrn ; get 4-bit color there
DF05: A8 tay
DF06: 20 01 E3 jsr sngflt ; convert Y to real in FAC
DF09: 4C B8 DE jmp chkcls ; require ')'
-uso.
-michael
NadaNet and AppleCrate II: parallel computing for Apple II computers!
Home page: http://home.comcast.net/~mjmahon
"The wastebasket is our most important design
tool--and it's seriously underused."
- References:
- USR() SCRN?
- From: lyricalnanoha@dosius.ath.cx (Steve Nickolas)