Download DB006 - GreenArrays
Transcript
DB006 G144A12 polyFORTH Supplement 'or 'xor 'and 'neg 'inv 'zeq 'zlt 'um+ 'nop ''+ OR XOR AND NEGATE INVERT 0= 0< UM+ NOP + (pst-p'3w) Classical Forth (inclusive) OR (nn-n). (pst-p'3w) Classical Forth (exclusive) XOR (nn-n). (pst-p'3w) Classical Forth AND (nn-n). 16 (n-n) Classical Forth NEGATE , modulo 2 . 16 (n-n) 1's complement inversion of full 18 bits, modulo 2 . (n-f) Classical Forth 0= (n-t). True is 16 1-bits. (pst-p'3w) Classical Forth (inclusive) 0< (n-t). True is 16 1-bits. (uu-uc) 17-bit sum of 16-bit numbers. Truly does nothing. (pst-p'3n) Classical Forth - (nn-n). (pst-p'3n) Classical Forth + (nn-n). 2.3.7 Stack Down Node (006) This node contains overflow functions from Stack with room left for application functions. Its register assignments are: B is the port address (down) for the Stack node (106). A and the carry flag are reserved for math routines and may be used to hold state between commands. As a coprocessor node, it is continually executing the idle routine. Its primitives and routines are: F18 Symbol xqt idle ''s pF Symbol ----'S 43xp --- pops; 'ex@ 'ex! 'cx? --XM@ XM! XCX 'mk! MK! 'sus SUSPEND Function Executes in stack node: 'sp@ (pst-p'tp") Classical Forth 'S (-a). Pushes stack pointer which is the external memory address at which the initial t would be stored. (op) Internal function that commands stack node to do its pop43 (pst-p43st), then execute the instruction word given (op), and finally pop s from external stack. op is assumed to consume 3 arguments, or to take 4 arguments and return one result. Ends a coprocessor operation by having stack node perform its pops . (pst-p'3w) External stack (ah-w) . Fetches w from external RAM at address h:a . (pst-p'54) External stack (wah). Writes w to external RAM at address h:a . (pst-p'5f) External stack (wahx-f) Compare & Exchange. If the word in external RAM at address h:a has the value x , stores w there and returns f as nonzero Otherwise does not alter RAM and returns f as zero. (pst-p'54) External stack (msk f 0). f=1 sets SRAM master enable mask to msk . f=0 posts stimuli for master(s) given by msk . In both cases the port write bits of the mask are significant, all others must be zero. See AN003, SRAM Control Cluster, for more information about this function. Suspends VM execution, waiting for a stimulus from one of the other masters on the SRAM cluster. 2.3.8 Stack Up Node (206) This node is set aside for application microcode. It includes optional routines to facilitate interactive testing whereby the IDE is used to compile and test new microcode on a live polyFORTH system. B is the port address (up) for the Stack node (106). A is available for application assignment. As a coprocessor node, it is continually executing the idle routine. Its primitives and routines are: F18 Symbol 14 pF Symbol Function Copyright© 2010-2011 GreenArrays, Inc. 9/23/12