ebook img

Jupiter Ace Quick Reference Card (2006)(Lopes, Ricardo) PDF

2006·0.16 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Jupiter Ace Quick Reference Card (2006)(Lopes, Ricardo)

Comparison F+ (f f → f) f = f + f 1 2 3 3 1 2 Jupiter F- (f f → f) f = f - f 1 2 3 3 1 2 < (n1 n2 → flag) True if n1 < n2 F* (f1 f2 → f3) f3 = f1 * f2 = (n1 n2 → flag) True if n1 = n2 F/ (f1 f2 → f3) f3 = f1 / f2 ACE > (n1 n2 → flag) True if n1 > n2 FNEGATE (f1 → f2) f2 = -f1 0< (n → flag) True if n < 0 0= (n → flag) True if n = 0 Memory 0> (n → flag) True if n > 0 Reference Card U< (u u → flag) True if u < u @ (adr → x) Read x (2 bytes) from adr 1 2 1 2 D< (d d → flag) True if d < d ! (x adr →) Store x (2 bytes) to adr 1 2 1 2 MAX (n n → n) Leave greater of two numbers C@ (adr → c) Read c (1 byte) from adr ACE Forth 1 2 3 MIN (n n → n) Leave lesser of two numbers C! (c adr →) Store c (1 byte) to adr 1 2 3 Stack Cells Description Logical Control Structures Notation c 1 Character (high byte ignored) AND (x x → x) Bitwise boolean AND IF (flag →) Conditional structure IF..(ELSE)..THEN 1 2 3 OR (x x → x) Bitwise boolean OR ELSE (→) False condition of an IF structure flag 1 Boolean (0 = False, 1 = True) 1 2 3 XOR (x x → x) Bitwise boolean XOR THEN (→) End of an IF conditional structure 1 2 3 n 1 Signed number DO (n n →) Counted loop structure DO...LOOP 1 2 u 1 Unsigned number Integer Arithmetic (n2 = count start, n1 = count end) LOOP (→) Increment loop count, terminate if end x 1 Non-specific single cell + (n n → n) n = n + n +LOOP (n →) Add n to loop count, terminate if end 1 2 3 3 1 2 adr 1 Memory address - (n n → n) n = n - n I (→ n) Get current loop count 1 2 3 3 1 2 * (n n → n) n = n * n I' (→ n) Get current loop count limit d 2 Signed double number 1 2 3 3 1 2 / (n n → n) n = n / n J (→ n) Get outer loop count 1 2 3 4 1 2 ud 2 Unsigned double number MOD (n n → n) Remainder of n / n (sign of n) LEAVE (→) Force a DO...LOOP count to end 1 2 3 1 2 1 /MOD (n n → n n) n = remainder of n / n BEGIN (→) Begin a WHILE or UNTIL loop xd 2 Non-specific double cell 1 2 3 4 3 1 2 n = n / n UNTIL (flag →) Loop until flag = true (BEGIN..UNTIL) 4 1 2 f 2 Floating point number */ (n1 n2 n3 → n4) n4 = n1 * n2 / n3 WHILE (flag →) Exit loop when flag = false Immediate words in Green */MOD (n n n → n n) n = remainder of n * n / n (BEGIN..WHILE..REPEAT) 1 2 3 4 5 4 1 2 3 Immediate and compile-only words in Blue n = n * n / n REPEAT (→) Jump back to BEGIN in a WHILE loop 5 1 2 3 1+ (n1 → n2) n2 = n1 + 1 EXIT ( → ) Exit current word execution Stack Manipulation 1- (n1 → n2) n2 = n1 - 1 EXECUTE (adr →) Execute word with compilation adr 2+ (n1 → n2) n2 = n1 + 2 CALL (adr →) Call Z80 code (terminated with jp(iy)) DROP (x →) Discard TOS (top of stack) 2- (n1 → n2) n2 = n1 - 2 ABORT (... →) Quit program, clearing data stack DUP (x → x x) Duplicate TOS ABS (n → u) u = |n| (absolute value) QUIT (→) Quit program, not clearing data stack ?DUP (x → x (x)) DUP, if non-zero NEGATE (n → n) n = -n (two's complement) 1 2 2 1 OVER (x1 x2 → x1 x2 x1) Copy second on stack to top U* (u1 u2 → ud) ud = u1 * u2 Character Input/Output PICK (xn...x1 n → xn...x1 xn) Copy nth cell to top U/MOD (ud u1 → u2 u3) u2 = remainder of ud / u1 ROLL (xn...x1 n → xn-1...x1 xn) Rotate nth cell to top u3 = ud / u1 CR (→) Print carriage return and line feed ROT (x1 x2 x3 → x2 x3 x1) Rotate 3rd cell to top D+ (d1 d2 → d3) d3 = d1 + d2 ASCII text (→ c) ASCII code of first character in text >R (x →) (R: → x) Move TOS to Return Stack DNEGATE (d1 → d2) d2 = -d1 (two's complement) EMIT (c →) Print ASCII c character R> (→ x) (R: x →) Retrieve from Return Stack SPACE (→) Print one space SWAP (x1 x2 → x2 x1) Exchange the two top cells Floating Point Arithmetic SPACES (n →) Print n spaces, if n > 0 ." (→) Print a string terminated by '' INT (f → n) Convert floating number to integer TYPE (adr n →) Print n characters from adr UFLOAT (u → f) Convert unsigned integer to float QUERY (→) Accept entry at the input buffer WORD (c → adr) Take text from input buffer using c COMPILER word (n →) Start a compiling word definition IN (adr → c) Read byte from Z80 input port adr as delimiter, leave adr of length byte RUNS> (→ adr) Defines the action routine of a OUT (c adr →) Write byte to Z80 output port adr RETYPE ( → ) Allow input buffer editing, turning compiling word INVIS (→) Disable copy-up mechanism and OK cursor to ? FIND word (→ adr) Find word compilation address VIS (→) Enable copy-up mechanism and OK INKEY (→ x) Read keyboard (0 = no key pressed) (0 if not found) LINE (→) Interpret the input buffer as FORTH FORGET word (→) Clear all definitions back to word PLOT (n n n →) Plot at n (X), n (Y) with mode n 1 2 3 1 2 3 Number Input/Output LIST word (→) List word definition (0 = unplot, 1=plot, 2=move, 3=change) EDIT word (→) Edit word definition BASE (→ adr) 1-byte variable containing REDEFINE word (→) Replace previous word with the Tape Files system number base newest dictionary entry DECIMAL (→) Set base to decimal LOAD name (→) Load vocabulary from tape . (n →) Print n with one trailing space Vocabulary SAVE name (→) Save vocabulary to tape U. (u →) Print unsigned with one VERIFY name (→) Verify vocabulary trailing space VOCABULARY name (→) Define a new vocabulary BLOAD name (adr u →) Load u bytes from tape to adr F. (f →) Print float with one trailing vocabulary (→) Set CONTEXT = vocabulary BSAVE name (adr u →) Save u bytes from adr to tape space CONTEXT (→ adr) Get current word search BVERIFY name (adr u →) Verify u bytes from adr CONVERT (d1 adr1 → d2 adr2) Convert string at adr1 to vocabulary address (15411) if adr = 0 then use file value (BLOAD or BVERIFY) double number and add into CURRENT (→ adr) Get current word definition if u = 0 then use file value (BLOAD or BVERIFY) d leaving result d vocabulary address (15409) 1 2 <# (→) Initiate formatted output FORTH (→) Set CONTEXT to the FORTH Error Codes # (ud → ud) Convert one digit from ud vocabulary 1 2 1 and HOLD it in the PAD DEFINITIONS (→) Set CURRENT vocabulary to Error Description #S (ud → 0 0) Convert and HOLD all CONTEXT remaining significant digits VLIST (→) List dictionary to screen 1 Not enough memory HOLD (c →) Insert character into formatted string Compiler 2 Data Stack Underflow SIGN (n →) HOLD minus sign if n < 0 3 BREAK pressed #> (ud → adr n) Finish formatted output , (x →) Compile x into the dictionary leaving address & length of C, (c →) Compile c into the dictionary 4 Compile only word the resulting string ALLOT (n →) Enclose n bytes in the dictionary NUMBER (→ x (adr)) Get number from input buffer LITERAL (x →) Compile x as literal 5 Structure imbalance (→ n 4102) Converted to integer [ (→) Enter interpret mode 6 Name size < 1 or > 64 (→ f 4181) Converted to float ] (→) Enter compile mode (→ 0) Conversion failed 7 PICK or ROLL operand ≤ 0 Miscellaneous 8 Floating point overflow Word Definition ( (→) Start a comment, terminated by ) 9 AT or PLOT to the input buffer : word (→) Start a word definition CLS (→) Clear screen ; (→) Terminate a word definition AT (n n →) Set print position to row n and 10 Tape error 1 2 1 VARIABLE name (x →) Define a variable with value x column n 2 11 REDEFINE or FORGET error variable-name (→ adr) Get variable adr HERE (→ adr) Next available dictionary location CONSTANT name (x →) Define a constant with value x PAD (→ adr) Scratch pad area address (9985) 12 Incomplete definition in dictionary constant-name (→ x) Get constant value SLOW (→) Normal execution. Enable error checks IMMEDIATE (→) Mark newest word as immediate 13 Word not found or is ROM or is FORTH FAST (→) Faster execution. Disable error checks CREATE name (→) Create a dictionary entry BEEP (u1 u2 →) Play tone 14 Word not Listable DEFINER word (→) Start a defining word definition u = 1000000 / (8 * frequency [Hz]) 1 DOES> (→ adr) Define the action routine of a u = duration [ms] defining word 2 2006 © by Ricardo F. Lopes

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.