19
µFlashTCP-EP
User’s Manual
JK
microsystems
QuickBASIC Console I/O
Some of the code produced by Microsoft QuickBASIC and QuickBASIC Professional compilers
does not execute properly on the µFlashTCP-EP. In the case of console I/O, we believe that
QuickBASIC is generating code for specific hardware and software not present on the
µFlashTCP-EP controller.
There are two problems with console I/O. The first is that a
statement will not send output
to the console port. To output text to the console, open “cons:” as a file and print to it. The second
problem is that an
INPUT
statement will not echo the data entered by the user. To work around
this problem, we have added a feature which allows the application to enable a console echo
function in the BIOS. This feature is enabled by setting the byte at 40:8Ah to a one. Likewise, the
local echo is disabled by setting 40:8Ah to a zero.
The following BASIC code demonstrates both of these workarounds:
start:
OPEN “o”, 1, “cons:”
‘ console output
PRINT #1, “What’s your name? “‘ get string
GOSUB echoOn
‘ turn on local echo
INPUT name$
‘ get the name
GOSUB echoOff
‘ turn off local echo
PRINT #1, “”
‘ go down a line
PRINT #1, “Hi , “; name$
‘ print line and name
END
echoOn:
DEF SEG = &H40
‘ BIOS data seg
POKE &H8A, 1
‘ set local echo flag
RETURN
echoOff:
DEF SEG = &H40
‘ BIOS data seg
POKE &H8A, 0
‘ clear echo flag
RETURN
QuickBASIC Console I/O
Summary of Contents for 89-0040
Page 1: ...µFlashTCP EP User s Manual ...
Page 2: ......