BASIC loader

From HandWiki

A BASIC loader is a computer programming technique used with the BASIC programming language to POKE machine language opcodes and data into RAM. The technique was most prevalent in type-in program listings published for home computers of the 1980s, as it allowed the publication of programs that gained the benefits of fast-executing assembly language without requiring the user to own or know how to operate an assembler or machine language monitor program.[1] The programs most often took the form of a short "stub" loader followed by a (sometimes lengthy) series of DATAstatements that contained the core program logic as decimal opcodes. The loader mainly consisted of a FOR loop that READ the DATA statements and POKEd them into memory. The starting location for the POKEs was determined by the memory map of the platform in question; some loaders were able to distinguish between related platforms and alter the starting address based on what it found. Sometimes the DATA statements were in hexadecimal, in which case the loader would, if needed on the platform in question, contain code to translate from hex to the decimal numbers demanded by the POKE command. After inserting the assembly language program into memory, the loader program could use BASIC's SYS command to initiate execution of the assembly language code from a designated entry point.

References

  1. Mansfield, Richard (September 1985). "Machine Language For Beginners: From Machine Language To BASIC". COMPUTE!'s Gazette (Greensboro, North Carolina): 77. https://archive.org/stream/1985-09-computegazette/Compute_Gazette_Issue_27_1985_Sep#page/n77/mode/2up. Retrieved 2018-03-27.