Romvar question....
EGG09000
Posts: 4
If my bs2 code was·· SEROUT 2,84, [noparse][[/noparse]RomVar ]· and if i wanted it to CR when it recieved a RomVar = "C"
If i used the debug it would be something like this,
· IF RomVar = "9"· THEN DEBUG "9"
· IF RomVar = "="· THEN DEBUG "="
· IF RomVar = "?"· THEN DEBUG "?"
· IF RomVar = "E"· THEN DEBUG "E"
· IF RomVar = "C"· THEN DEBUG "C"
·
If i used the debug it would be something like this,
· IF RomVar = "9"· THEN DEBUG "9"
· IF RomVar = "="· THEN DEBUG "="
· IF RomVar = "?"· THEN DEBUG "?"
· IF RomVar = "E"· THEN DEBUG "E"
· IF RomVar = "C"· THEN DEBUG "C"
·
Comments
Or was there something more complicated you had in mind?
I'm not sure if CR and LF are predefined in Basic for the BS2. If not, you can define them with "CR CON 13" and "LF CON 10".
Download_Data:
SEROUT 2,84, [noparse][[/noparse]"Downloading Data...",CR ]
'PAUSE 20
'DEBUG CR, "Downloading Data...", CR
FOR DataSlot = 1 TO 15
STORE DataSlot
SEROUT 2,84, [noparse][[/noparse]CR, ? DataSlot ]
' PAUSE 20
FOR RomLoc = 0 TO 2047
SERIN 16, 16468, Cont_Download,1, Cont_Download, [noparse][[/noparse]Result]
'SERIN 3, 84 , Cont_Download,1, Cont_Download, [noparse][[/noparse]Result]
Cont_Download:
IF Result = 27 THEN GOTO Start
'IF RomVar = " " THEN Cont_Download:
READ RomLoc, RomVar
'DEBUG ? Romloc
'DEBUG RomVar
SEROUT 2,84, [noparse][[/noparse]RomVar ]
PAUSE 10
NEXT
'STORE DataSlot
PAUSE 5000
NEXT
GOTO Main
IF Result = 27 THEN GOTO Start