IBM 5150 PC Technical Reference (6025005, August, 1981) (PDF)

IBM 5150 PC Technical Reference (6025005, August, 1981) (PDF) IBM 5150 PC Technical Reference (6025005, August, 1981) (PDF)

classiccomputers.info
from classiccomputers.info More from this publisher
25.03.2015 Views

BASIC Workspace Variables If you do DEF SEG (Default workspace segment) OFFSET LENGTH Line number of current line being executed X '2E' 2 Line number of last error X '347' 2 Offset into segment of start of program text X '30' 2 Offset into of start of variables X '358' 2 (end of program text 1-1) Keyboard buffer contents X'SA' 1 if O-no characters in buffer if l-characters in buffer if you POKE & H6A, 0 you flush any characters in buffer Example: 100 Print PEEK (&H2E) + 256*PEEK (&H2F) ) L H 100 I X'S4' I X '00' I 3-23

3-24 NOTES

BASIC Workspace Variables<br />

If you do DEF SEG (Default workspace segment)<br />

OFFSET<br />

LENGTH<br />

Line number of current line being executed X '2E' 2<br />

Line number of last error X '347' 2<br />

Offset into segment of start of program text X '30' 2<br />

Offset into of start of variables X '358' 2<br />

(end of program text 1-1)<br />

Keyboard buffer contents X'SA' 1<br />

if O-no characters in buffer<br />

if l-characters in buffer<br />

if you POKE & H6A, 0 you<br />

flush any characters in buffer<br />

Example:<br />

100 Print PEEK (&H2E) + 256*PEEK (&H2F)<br />

) L H<br />

100<br />

I<br />

X'S4'<br />

I<br />

X '00'<br />

I <br />

3-23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!