13.07.2015 Views

apple-pascal-1.3-manual

apple-pascal-1.3-manual

apple-pascal-1.3-manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SAS 170 UB String assign. tos is either a source byte pointer or a character.(Characters always have a high byte of zero, while pointers never do.)tos-1 is a destination byte pointer. UB is the declared size of thedestination string. If the declared size is less than the current size of thesource string, give an execution error; otherwise transfer all bytes ofsource containing valid information to the destination string.IXS 155 Index string array. tos - 1 is a byte pointer to a string. tos is an indexinto the string. Check to see that the index is in the range 1..current stringlength. If so, continue execution; if not, give an execution error.Record and Array HandlingMOV 168 B Move words. Transfer a source block of B words, pointed to by bytepointer tos , to a similar destination block pointed to by byte pointertos-1.INC 162 B Increment field pointer. Index the word pointer tos by B words andpush the resultant word pointer.IXA 164 B Index array. tos is an integer index, tos - 1 is the array base wordpointer, and B is the size (in words) of an array element. Compute a wordpointer ( tos - 1 ) + ( B * tos ) to the indexed element and push thepointer.IXP 192 UB1,UB2 Index packed array. tos is an integer index, tos - 1 is the arraybase word pointer. UBl is the number of elements per word, andUB2 is the field width (in bits). Compute a packed field pointer tothe indexed field and push the resulting pointer.IV66Chapter 4: The P-Machine Instruction Set

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

Saved successfully!

Ooh no, something went wrong!