Explanation
DEF SEG Statement
Sets the current segment address.Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
DEF SEG [=address] |
address | A segment address used by BLOAD, BSAVE, CALL ABSOLUTE, PEEK, or POKE; a value in the range 0 through 65,535. If address is omitted, DEF SEG resets the current segment address to the default data segment. |
DEF SEG = 0
Status% = PEEK(&H417) 'Read keyboard status.
POKE &H417, (Status% XOR &H40) 'Change Caps Lock state, bit 6.
See also: | BSAVE, BLOAD | CALL ABSOLUTE | PEEK, POKE |