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.

Conventions and NotationEach operand on the evaluation stack (for example, tos or tos-1 ), cancontain from one byte to 256 bytes, depending on its type and value. Unlessspecifically noted to the contrary, operands used by an instruction arepopped off the evaluation stack (removed from the stack and not returned)as they are used.In the descriptions of the various P-machine instructions the parameters aregiven as UB , SB , DB , B , or W . The term tos means the operand on the topof the evaluation stack, tos -1 is the next operand, and so on. The columnsof information in the various instruction descriptions have the followingmeaning:Column 1 Column 2 Column3 Column 4opcode decimal instruction full name andmnemonic opcode parameters operation of theinstructionP~Machine InstructionsThis section lists all the P-machine opcodes by their class of operation.One-Word loads and StoresThis section lists opcodes that load and store single words.SLDC_OSLDC_l01SLDC_l27 127LDCNLDCI159199 wConstantShort load one-word constant. For an instruction SLDC_x , push theopcode, x , with the high byte zero. That is, push an integer withthe value x.Load constant NIL. Push 0.Load one-word constant. Push W.IV-62Chapter 4: The P-Machine Instruction Set

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

Saved successfully!

Ooh no, something went wrong!