13.07.2015 Views

apple-pascal-1.3-manual

apple-pascal-1.3-manual

apple-pascal-1.3-manual

SHOW MORE
SHOW LESS

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

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

o You can write assembly-language EXTERNAL procedures and functionswith untyped variable parameters. Pascal will pass the address of anyvariable to such a routine. An example of this technique at work is givenbelow under "Finding Variables."o You can write data into a disk file as a file containing records of one typeand read it out as a file containing records of a different type. By usinguntyped and device I/O operations, you can make transfers from Pascalmemory to block-structured devices and back without any type checkingat all. These operations are all covered in Chapter 10.Direct Memory AccessOne of the advantages of a higher-level language like Pascal is that itrelieves the programmer of the drudgery of having to work with memory atthe machine level. Sometimes, however, direct memory access is the bestway to accomplish a particular programming task. This section describestechniques for accessing the actual contents of machine memory from thePascal language level.PEEKs and POKEsPEEK and POKE are terms borrowed from the BASIC programminglanguage. The PEEK function accepts an actual address in machinememory and returns the scalar value of the byte stored there. The POKEprocedure accepts an actual address and a scalar value; it writes the valuein machine memory at that address. These are not built-in Apple Pascaloperations. You have to write them yourself.III-262Chapter 16: Miscellaneous Information

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

Saved successfully!

Ooh no, something went wrong!