papierkorb:sample9.blk
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| papierkorb:sample9.blk [2025-08-16 17:50] – ↷ Seite von projects:sample9.blk nach papierkorb:sample9.blk verschoben mka | papierkorb:sample9.blk [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | === Examples for lecture number nine === | ||
| - | < | ||
| - | Screen 0 not modified | ||
| - | 0 \ Examples for lecture number eight. | ||
| - | 1 \ Last change: | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | Screen 1 not modified | ||
| - | 0 \ Load screen | ||
| - | 1 \ Typing | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 8 FROM SAMPLE8.BLK | ||
| - | 9 FROM SAMPLE8.BLK | ||
| - | 10 FROM SAMPLE8.BLK 16 LOAD \ Load SPY | ||
| - | 11 FROM SAMPLE8.BLK 17 LOAD FROM SAMPLE8.BLK 18 LOAD | ||
| - | 12 8 VIEWS SAMPLE9.BLK | ||
| - | 13 8 VIEW# ! 7 | ||
| - | 14 ONLY EDITOR ALSO SOUND ALSO FORTH DEFINITIONS | ||
| - | 15 \ MARK EMPTY HERE FENCE ! | ||
| - | |||
| - | |||
| - | Screen 2 not modified | ||
| - | 0 \ Review-1 Dictionary Vocabularies | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 [ ' {word} ] LITERAL | ||
| - | 11 | ||
| - | 12 DP ( -- adr ) Variable containing next dict loacation. | ||
| - | 13 HERE ( -- adr ) Returns next available dictionary location. | ||
| - | 14 #VOCS ( -- n | ||
| - | 15 VOCS ( -- -- ) List all vocabularies in this FORTH system. | ||
| - | |||
| - | |||
| - | Screen 3 not modified | ||
| - | 0 \ Review-2 | ||
| - | 1 CURRENT ( -- adr ) Points to compilation vocabulary. | ||
| - | 2 CONTEXT ( -- adr ) Points the the vocabulary search order aray | ||
| - | | ||
| - | | ||
| - | | ||
| - | 6 DEFINITIONS ( -- -- ) Select the transient vocabulary ( first | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 ORDER ( -- -- ) Display current vocabulary search order. | ||
| - | 11 | ||
| - | 12 ALSO ( -- -- ) Push transient vocabulary making it the first | ||
| - | 13 resident vocabulary in the search order. | ||
| - | 14 PREVIOUS ( -- -- ) The inverse of ALSO, removes the most | ||
| - | 15 recently referenced vocabulary from the search order. | ||
| - | |||
| - | |||
| - | Screen 4 not modified | ||
| - | 0 \ Review-3 | ||
| - | | ||
| - | 2 VOCABULARY | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 9 ROOT ( -- -- ) A small vocabulary for controlling search order | ||
| - | 10 | ||
| - | 11 ONLY ( -- -- ) Erases the search order and forces the ROOT | ||
| - | 12 vocabulary to be the first and last. | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 5 not modified | ||
| - | 0 \ Structure of a FORTH word definition. | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 cfa -> | Addr Inner Interpr.| | ||
| - | 11 pfa -> | Parameter List | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 6 not modified | ||
| - | 0 \ Making a new vocabulary | ||
| - | 1 \ | ||
| - | 2 \ : RECURSE | ||
| - | | ||
| - | 4 : FACT ( n n! ) | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 9 \ RECURSIVE | ||
| - | 10 \ RECURSIVE | ||
| - | 11 | ||
| - | 12 : FACTORIAL | ||
| - | 13 DUP 0> IF DUP 1- FACTORIAL | ||
| - | 14 ELSE DROP 1 | ||
| - | 15 THEN ; | ||
| - | |||
| - | |||
| - | Screen 7 not modified | ||
| - | 0 \ Making a new vocabulary | ||
| - | 1 ONLY FORTH ALSO DEFINITIONS | ||
| - | 2 VOCABULARY SOUND CR .( VOCS ) VOCS CR | ||
| - | 3 ROOT DEFINITIONS | ||
| - | 4 SOUND DEFINITIONS | ||
| - | | ||
| - | 6 \ PC! ( byte n | ||
| - | 7 \ PC@ ( n byte ) Input byte from port number n. | ||
| - | 8 HEX | ||
| - | 9 : | ||
| - | 10 61 PC@ | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 : S.OFF ( -- -- ) \ Turn speaker off. | ||
| - | 14 61 PC@ | ||
| - | 15 FFFC AND 61 PC! ; DECIMAL | ||
| - | |||
| - | |||
| - | Screen 8 not modified | ||
| - | 0 \ Vocabularies | ||
| - | | ||
| - | | ||
| - | 3 : TONE ( freq -- ) \ Make tone of specified frequency. | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 42 PC! 42 PC! \ Store low and high byte in timer. | ||
| - | 11 S.ON ; DECIMAL | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 9 not modified | ||
| - | 0 \ Vocabularies. | ||
| - | | ||
| - | 2 : C 131 TONE ; | ||
| - | 3 : D 147 TONE ; | ||
| - | 4 : E 165 TONE ; | ||
| - | 5 : F 175 TONE ; | ||
| - | 6 : G 196 TONE ; | ||
| - | 7 : A 220 TONE ; | ||
| - | 8 : B 247 TONE ; | ||
| - | 9 : CC 262 TONE ; | ||
| - | 10 | ||
| - | 11 : BEAT 20000 0 DO LOOP ; | ||
| - | 12 | ||
| - | 13 : SCALE C BEAT D BEAT E BEAT F BEAT G BEAT | ||
| - | 14 A BEAT B BEAT CC BEAT BEAT BEAT S.OFF ; | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 10 not modified | ||
| - | 0 \ Vectored execution, Brodie | ||
| - | | ||
| - | 2 \ EXECUTE | ||
| - | | ||
| - | 4 : F.HELLO | ||
| - | 5 : B.HELLO | ||
| - | 6 : P.HELLO | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 : GREETING | ||
| - | 11 | ||
| - | 12 \ Try ' F.HELLO EXECUTE | ||
| - | 13 \ ' F.HELLO INTRO ! | ||
| - | 14 \ ' P.HELLO INTRO ! | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 11 not modified | ||
| - | 0 \ PERFORM | ||
| - | 1 \ | ||
| - | 2 \ PERFORM | ||
| - | | ||
| - | 4 : GREETING1 | ||
| - | | ||
| - | 6 \ IS {word} | ||
| - | 7 \ Sample usage: | ||
| - | | ||
| - | 9 : GREETING2 | ||
| - | 10 | ||
| - | 11 \ DEFER {word} | ||
| - | 12 \ | ||
| - | 13 | ||
| - | 14 DEFER GREETING3 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 12 not modified | ||
| - | 0 \ Extending the compilers!!! | ||
| - | 1 \ Template for creating new compilers: | ||
| - | 2 \ : {compiler name} | ||
| - | 3 \ | ||
| - | 4 \ | ||
| - | | ||
| - | 6 : BYTE-CON | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 : BYTE-VAR | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 11 BYTE-CON AA 22 BYTE-CON BB | ||
| - | 15 BYTE-VAR XX BYTE-VAR YY | ||
| - | |||
| - | |||
| - | Screen 13 not modified | ||
| - | 0 \ 10: | ||
| - | | ||
| - | | ||
| - | 3 : => STORE? ON ; | ||
| - | | ||
| - | 5 : SMART-BYTE-VAR | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 14 not modified | ||
| - | 0 \ The MUSIC compiler. | ||
| - | 1 ONLY FORTH ALSO SOUND DEFINITIONS | ||
| - | | ||
| - | | ||
| - | | ||
| - | 5 : DELAY SPEED 0 ?DO I DROP LOOP ; \ Aprox .5 sec delay. | ||
| - | 6 \ Make it easy to change the beat and octave. | ||
| - | 7 : 1/1 4 BEAT ! ; : 1/2 2 BEAT ! ; : 1/4 1 BEAT ! ; | ||
| - | 8 : 1ST 1 OCTAVE ! ; : 2ND 2 OCTAVE ! ; : 3RD 4 OCTAVE ! ; | ||
| - | 9 \ Rest for current number of beats. | ||
| - | 10 : REST ( -- -- ) | ||
| - | 11 BEAT @ 0 ?DO DELAY LOOP ; : R REST ; | ||
| - | 12 \ The note compiler. | ||
| - | 13 : NOTE | ||
| - | 14 DOES> | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 15 not modified | ||
| - | 0 \ Create Notes | ||
| - | 1 \ Create the notes with the note compiler. | ||
| - | | ||
| - | 3 1308 NOTE C 1386 NOTE C# 1468 NOTE D 1556 NOTE D# | ||
| - | 4 1648 NOTE E 1746 NOTE F 1850 NOTE F# 1960 NOTE G | ||
| - | 5 2077 NOTE G# 2200 NOTE A 2331 NOTE A# 2469 NOTE B | ||
| - | | ||
| - | | ||
| - | 8 : SCALE 1ST 1/4 C D E F G A B 2ND 1/2 C R | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 16 not modified | ||
| - | 0 \ Music Music?? | ||
| - | 1 : PART1 1/4 2ND F# E D C D E D | ||
| - | | ||
| - | 3 : PART2 1/2 2ND F# F# 1/4 F# E D E F# E D F# 1/2 E ; | ||
| - | | ||
| - | 5 : PART3 1/4 2ND F# E F# G A F# D E F# D E 1ST A 1/2 2ND D R ; | ||
| - | | ||
| - | 7 : PART4 1/4 1ST F# E F# G A G F# E F# E F# G ; | ||
| - | | ||
| - | 9 : PART5 1/4 2ND D E F# D 1ST B 2ND C# D 1ST A F# G A F# | ||
| - | 10 1/2 E 1/4 D E ; | ||
| - | 11 : PART6 1/4 1ST F# E F# G A F# D E F# D E C# 1/2 D R ; | ||
| - | 12 | ||
| - | 13 : TURKEY | ||
| - | 14 PART4 1/2 1ST B 1/4 B 2ND C# PART5 PART6 ; | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 17 not modified | ||
| - | 0 \ Multi-diminsional arrays for F83 | ||
| - | 1 : ACHECK ( {n items} n {n items} | ||
| - | | ||
| - | | ||
| - | | ||
| - | 5 : *ARRAY | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 OVER , ( save dimension ) | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 1 , ( save dummy dimension ) | ||
| - | 14 2 * ALLOT ( allocate space for words ) | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 18 not modified | ||
| - | 0 \ Multi-dimensional array definition, cont | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 2 * ( double offset for words ) | ||
| - | 12 + 2+ ; ( calculate element address ) | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 19 not modified | ||
| - | 0 \ Multi-dimensional array definition, cont | ||
| - | 1 EXIT | ||
| - | 2 To define an array, the vector size for each dimension | ||
| - | 3 must be on the stack followed by the total # of dimensions | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 9 To get an indexed address into the array, put the coordinates | ||
| - | 10 on the stack followed by the name of the array. | ||
| - | 11 Example: to retrieve the value stored in (x,y,z) = (1, | ||
| - | 12 for the array above, you would execute: | ||
| - | 13 1 2 3 MATRIX @ | ||
| - | 14 to store (x,y,z) = 5 at 3D space x=2,y=3,z=5 do: | ||
| - | 15 5 2 3 5 MATRIX ! | ||
| - | |||
| - | |||
| - | Screen 20 not modified | ||
| - | 0 \ Homework | ||
| - | | ||
| - | 2 EXIT | ||
| - | 3 Homework | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 21 not modified | ||
| - | 0 \ VECTOR | ||
| - | 1 \ Create a one dimensional vector n storage cells | ||
| - | 2 \ Usage: | ||
| - | 3 \ Later: | ||
| - | | ||
| - | 5 : VECTOR | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 TUCK @ OVER \ adr index n index | ||
| - | 11 <= OVER 0< OR \ adr index flag | ||
| - | 12 | ||
| - | 13 1 + 2* + ; \ Compute address of ith element | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 22 not modified | ||
| - | 0 \ ANY-SIGN? | ||
| - | 1 \ Leave a true flag if string begins with a -ve sign. | ||
| - | 2 \ Note we assume a counted string!! | ||
| - | 3 \ the first string character. | ||
| - | 4 : ANY-SIGN? ( adr | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 THEN ; | ||
| - | 11 \ Move up to first non blank of string. | ||
| - | 12 \ to position before first non blank!! | ||
| - | 13 : SKIP-BLANKS ( adr adr' ) | ||
| - | 14 BEGIN 1+ DUP C@ BL <> UNTIL 1- ; | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 23 not modified | ||
| - | 0 \ FETCH/ | ||
| - | 1 \ This routine fetches a string and converts to double number. | ||
| - | 2 : FETCH/ | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 WHILE 0 REPEAT | ||
| - | 11 C@ BL <> | ||
| - | 12 WHILE 2DROP R> DROP BEEP \ c a n | ||
| - | 13 ASCII ? 2 PICK C! ROT \ a n c | ||
| - | 14 | ||
| - | 15 DPL @ 0< IF DPL OFF THEN ; \ DPL=0 if .pt not entered | ||
| - | |||
| - | |||
| - | Screen 24 not modified | ||
| - | 0 \ (#IN) 15: | ||
| - | 1 \ Fetch a double number using field with of n using adr for | ||
| - | 2 \ and input buffer. | ||
| - | 3 \ required to repeat until he makes a valid number. | ||
| - | 4 : (#IN) ( adr n dn ) | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 1+ ROT + CUR! \ Restore cursor. | ||
| - | 11 DROP R> R> ; \ Recover our number. | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 25 not modified | ||
| - | 0 \ D#IN WD#IN XYWD# | ||
| - | 1 \ Input double number a current cursor position using default | ||
| - | 2 \ field with of 6. Input buffer is at PAD | ||
| - | 3 : D#IN ( -- dn ) | ||
| - | | ||
| - | | ||
| - | 6 \ As above but field width is specified on the stack. | ||
| - | 7 : WD#IN ( n dn ) | ||
| - | | ||
| - | | ||
| - | 10 \ As above but cursor position is also specified on the stack. | ||
| - | 11 : XYWD#IN ( x y n dn ) | ||
| - | 12 -ROT AT WD#IN ; | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 26 not modified | ||
| - | 0 \ S#IN WS#IN XYS# | ||
| - | 1 \ Input single number a current cursor position using default | ||
| - | 2 \ field with of 6. Input buffer is at PAD | ||
| - | 3 : S#IN ( -- dn ) | ||
| - | | ||
| - | | ||
| - | 6 \ As above but field width is specified on the stack. | ||
| - | 7 : WS#IN ( n dn ) | ||
| - | | ||
| - | | ||
| - | 10 \ As above but cursor position is also specified on the stack. | ||
| - | 11 : XYS#IN ( x y n dn ) | ||
| - | 12 -ROT AT WS#IN ; | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 27 not modified | ||
| - | 0 \ Read screen location. | ||
| - | 1 ONLY EDITOR ALSO FORTH ALSO DEFINITIONS | ||
| - | | ||
| - | 3 CODE SC@ ( -- char ) | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 9 U>= IF 32 # AL MOV THEN | ||
| - | 10 | ||
| - | 11 END-CODE | ||
| - | 12 : MARK ( n -- ) | ||
| - | 13 CUR@ 0 ROT AT SC@ 112 ATRIB ! VEMIT 15 ATRIB ! CUR! ; | ||
| - | 14 : -MARK ( n -- ) | ||
| - | 15 CUR@ 0 ROT AT SC@ VEMIT CUR! ; | ||
| - | |||
| - | |||
| - | Screen 28 not modified | ||
| - | 0 \ READ-SCREEN | ||
| - | | ||
| - | | ||
| - | 3 \ Copy line n of screen into SLINE-BUF . | ||
| - | 4 : READ-SCREEN | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 : TEST ( n -- ) | ||
| - | 12 READ-SCREEN | ||
| - | 13 SLINE-BUF 80 -TRAILING TYPE ; | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 29 not modified | ||
| - | 0 \ Code definitions: | ||
| - | 1 CODE DOUBLE ( n 2n ) | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 7 CODE 10* ( n 10n ) | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 30 not modified | ||
| - | 0 \ Sample code definitions for the curious. | ||
| - | 1 CODE SPLIT ( hilo lo hi ) | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 9 CODE MELD ( lo hi hilo ) | ||
| - | 10 AX POP | ||
| - | 11 BX POP | ||
| - | 12 AL AH MOV | ||
| - | 13 BL AL MOV | ||
| - | 14 AX PUSH | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 31 not modified | ||
| - | 0 \ RECURSIVE TREES | ||
| - | 1 : TREE ( pfa -- ) RECURSIVE | ||
| - | | ||
| - | 3 : TREE 0 TREE ; | ||
| - | | ||
| - | 5 : WHATIS ( -- -- ) | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 TREE VEHICLE | ||
| - | 12 BOAT FERRY BOAT TUG BOAT ROW | ||
| - | 13 CAR | ||
| - | 14 VW BUS VW BEETLE | ||
| - | 15 PLANE JET JET | ||
| - | |||
| - | |||
| - | Screen 32 not modified | ||
| - | 0 \ RECURSIVE TREES | ||
| - | 1 : BTREE ( -- -- ) RECURSIVE | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 B2 C2.1 C2.2 | ||
| - | 11 C1.1 D1.1.1 | ||
| - | 12 C1.2 D1.2.1 | ||
| - | 13 C2.1 D2.1.1 | ||
| - | 14 C2.2 D2.2.1 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 33 not modified | ||
| - | | ||
| - | 1 : TAB BEGIN #OUT @ 7 MOD WHILE SPACE REPEAT ; | ||
| - | | ||
| - | 3 : LEAVES | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 8 : SL | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 34 not modified | ||
| - | 0 \ Intelligent data structures. | ||
| - | 1 \ Finds the average of the n elements at adr+4 and stores the | ||
| - | 2 \ result at adr+2. Only non zero elements are counted. | ||
| - | 3 \ AARRAY looks like -> | n | avg | x1 | x2 | ... | xn | | ||
| - | 4 : AAVERAGE ( adr -- ) | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 IF 1 D+ \ a sum count | ||
| - | 11 ELSE DROP | ||
| - | 12 THEN 2 | ||
| - | 13 | ||
| - | 14 / SWAP 2+ ! ; | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 35 not modified | ||
| - | 0 \ Intelligent Data Structures. | ||
| - | 1 \ This is a flag that indicates the acces mode. The default | ||
| - | 2 \ mode is is fetch (flag false) and true indicates store mode. | ||
| - | 3 VARIABLE (:=) (:=) OFF | ||
| - | 4 : := (:=) ON ; | ||
| - | 5 : AARRAY ( n -- ) | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 SWAP 1+ 2* + R> | ||
| - | 11 IF ! R> AAVERAGE | ||
| - | 12 ELSE @ R> DROP | ||
| - | 13 THEN ; | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | </ | ||
papierkorb/sample9.blk.1755359401.txt.gz · Zuletzt geändert: 2025-08-16 17:50 von mka