13.07.2015 Views

Turbo Basic

Turbo Basic

Turbo Basic

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

POKE statementFunctionSyntaxRemarksSee AlsoExamplePOKE writes a byte to a specified address.POKE offset,va7ueoffset is the address, a numeric value ranging from 0 to 65,535.value is the byte value to be written to that address, ranging from 0to 255. offset is relative to the segment defined by the most recentDEF SEC statement.POKE writes byte-sized values to the indicated address, and is alow-level escape from <strong>Turbo</strong> <strong>Basic</strong>'s normal use of memory. SincePOKE performs no error checking, it isn't difficult to crash DOSand/or your program by improper use of this command.PEEKDIM Array%(5) t allocate array of 6 integersDEF SEG = VARSEG(Array%(O»t using POKE initialize the arrayFOR I% = 0 TO 11POKE I%, &HFFNEXT I%t using PEEK display array contentsFOR I% = 0 TO 11PRINT HEX$(PEEK(I%»NEXT I%END t end the program304<strong>Turbo</strong> <strong>Basic</strong> Owner's Handbook

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

Saved successfully!

Ooh no, something went wrong!