papierkorb:sample1.blk
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| papierkorb:sample1.blk [2025-08-16 17:50] – ↷ Seite von projects:sample1.blk nach papierkorb:sample1.blk verschoben mka | papierkorb:sample1.blk [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | === Examples and notes for lecture # 1 === | ||
| - | < | ||
| - | print Screen 0 not modified | ||
| - | 0 \ Examples and notes for lecture # 1 | ||
| - | 1 \ Last change: | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 Some important system words. | ||
| - | 11 | ||
| - | 12 The B.C. Chapter of the FORTH Interest Group meets at BCIT | ||
| - | 13 in Room 1A-324 on the first Thursday of each month. | ||
| - | 14 The FORTH Board is a Computer Bulletin Board System run by BCFIG | ||
| - | 15 Phone: 434-5886 if you have a modem and communication software. | ||
| - | |||
| - | |||
| - | Screen 1 not modified | ||
| - | 0 \ Load screen for HELP system | ||
| - | | ||
| - | 2 ONLY FORTH DEFINITIONS | ||
| - | | ||
| - | 4 \ These words require | ||
| - | 5 \ file and the the ANSI.SYS driver to be on your boot disk. | ||
| - | | ||
| - | 7 : ESC[ 27 EMIT ASCII [ EMIT ; | ||
| - | 8 : CLS ESC[ ." 2J" ; | ||
| - | 9 : BRIGHT ESC[ ." 1m" ; | ||
| - | 10 : NORMAL ESC[ ." 0m" ; | ||
| - | 11 : BLUE ESC[ ." 44m" ; | ||
| - | 12 | ||
| - | 13 FROM HELP.BLK | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 2 not modified | ||
| - | 0 \ Entering and Exiting the FORTH System. | ||
| - | 1 FORTH83 {name}.BLK | ||
| - | | ||
| - | | ||
| - | 4 FORTH83 B: | ||
| - | | ||
| - | 6 BYE Exit the FORTH system and return to DOS | ||
| - | | ||
| - | 8 F83 | ||
| - | | ||
| - | 10 is opened. | ||
| - | 11 F83 | ||
| - | 12 | ||
| - | 13 Note: I have never used the Laxen and Perry editor, so you are | ||
| - | 14 on your own here. See the file README.PC for help if | ||
| - | 15 you would like to try this out. | ||
| - | |||
| - | |||
| - | Screen 3 not modified | ||
| - | 0 \ Elementary Word Definitions. | ||
| - | | ||
| - | 2 : {name} | ||
| - | | ||
| - | 4 : Begin a word definition. | ||
| - | 5 ; End a word definition. | ||
| - | 6 {name} | ||
| - | | ||
| - | 8 Example: | ||
| - | | ||
| - | 10 : FIRST | ||
| - | 11 | ||
| - | 12 ." | ||
| - | 13 is displayed on the display or console device. | ||
| - | 14 CR Start a new line. ( carriage return/ | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 4 not modified | ||
| - | 0 \ Working with FORTHs word dictionary. | ||
| - | | ||
| - | 2 \ WORDS List all words in the FORTH dictionary. | ||
| - | 3 \ EMPTY | ||
| - | 4 \ FORGET {name} Remove {name} and all words defined since {name} | ||
| - | 5 \ from the FORTH dictionary. | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 5 not modified | ||
| - | 0 \ 13: | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 6 not modified | ||
| - | 0 \ PHONE LIST | ||
| - | | ||
| - | 2 : JACK ." | ||
| - | | ||
| - | 4 : GEORGE | ||
| - | 5 \ EXIT above prevents the rest of this screen from compiling. | ||
| - | 6 : | ||
| - | 7 : | ||
| - | 8 : | ||
| - | 9 : | ||
| - | 10 : | ||
| - | 11 : | ||
| - | 12 : | ||
| - | 13 : | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 7 not modified | ||
| - | 0 \ CHECKER BOARD 10: | ||
| - | | ||
| - | 2 : BLACK SPACE SPACE ; | ||
| - | | ||
| - | 4 : WHITE 177 EMIT 177 EMIT ; | ||
| - | | ||
| - | 6 : ROW1 CR BLACK WHITE BLACK WHITE BLACK WHITE BLACK WHITE ; | ||
| - | | ||
| - | 8 : ROW2 CR WHITE BLACK WHITE BLACK WHITE BLACK WHITE BLACK ; | ||
| - | | ||
| - | 10 : BOARD CR ROW1 ROW2 ROW1 ROW2 ROW1 ROW2 ROW1 ROW2 ; | ||
| - | 11 | ||
| - | 12 : CHECKER_BOARD | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 8 not modified | ||
| - | 0 \ ANOTHER CHECKER BOARD 10: | ||
| - | | ||
| - | | ||
| - | 3 : BLACK SPACE SPACE ; | ||
| - | | ||
| - | 5 : WHITE 177 EMIT 177 EMIT ; | ||
| - | | ||
| - | 7 : ROW1 CR 4 0 DO BLACK WHITE LOOP ; | ||
| - | | ||
| - | 9 : ROW2 CR 4 0 DO WHITE BLACK LOOP ; | ||
| - | 10 | ||
| - | 11 : BOARD CR 4 0 DO ROW1 ROW2 LOOP ; | ||
| - | 12 | ||
| - | 13 : CHECKER_BOARD | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 9 not modified | ||
| - | 0 \ MQUIT 13: | ||
| - | 1 \ This stack print is more compact and uses unsigned for HEX #s. | ||
| - | 2 : .S ( -- -- ) | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 7 \ My quit routine which displays stack after each operation. | ||
| - | 8 : MQUIT ( -- -- ) | ||
| - | | ||
| - | 10 | ||
| - | 11 STATE @ NOT | ||
| - | 12 IF CR .S ASCII > EMIT SPACE THEN | ||
| - | 13 | ||
| - | 14 AGAIN ; | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 10 not modified | ||
| - | 0 \ VEDIT CURSOR CONTROL | ||
| - | 1 up arrow or control E move cursor one position up | ||
| - | 2 down arrow or control X move cursor one position down | ||
| - | 3 left arrow or control S move cursor one position left | ||
| - | 4 right arrow or control D move cursor one position right | ||
| - | 5 tab | ||
| - | 6 shift tab or control O move cursor one tab stop left | ||
| - | 7 control A or | ||
| - | 8 control left arrow move cursor one word left | ||
| - | 9 control F | ||
| - | 10 control right arrow move cursor one word right | ||
| - | 11 return | ||
| - | 12 home key move to start of text (upper left screen corner) | ||
| - | 13 end | ||
| - | 14 control home move to the beginning of the current line. | ||
| - | 15 control end move to the last character of the current line. | ||
| - | |||
| - | |||
| - | Screen 11 not modified | ||
| - | 0 \ VEDIT - DELETE, ERASE & INSERT | ||
| - | 1 Del key or | ||
| - | 2 control G | ||
| - | 3 back space erase character behind cursor leaving a blank. | ||
| - | 4 control T | ||
| - | 5 control U | ||
| - | 6 control Y | ||
| - | 7 alt | ||
| - | 8 F9 erase entire screen to blanks. | ||
| - | 9 alt | ||
| - | 10 Ins key toggle between overstrike and insert mode. | ||
| - | 11 control N | ||
| - | 12 alt | ||
| - | 13 control J | ||
| - | 14 control W | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 12 not modified | ||
| - | 0 \ VEDIT - SEARCH REPLACE, LINE STACK | ||
| - | | ||
| - | 2 control Q then press any character. | ||
| - | | ||
| - | | ||
| - | 5 F7 find first occurance of string. | ||
| - | 6 control L | ||
| - | 7 F8 find and replace string (one replace). | ||
| - | 8 F8 (answer prompts with return) | ||
| - | | ||
| - | 10 | ||
| - | 11 F3 push current line to line stack without deleting | ||
| - | 12 F5 pop top of line stack to current line. | ||
| - | 13 F4 push current line to line stack and delete it. | ||
| - | 14 F7 insert top of line stack at current line. | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 13 not modified | ||
| - | 0 \ VEDIT - SCREEN CONTROL | ||
| - | 1 PgUp or control R move back one screen. | ||
| - | 2 PgDn or control C move to next screen. | ||
| - | 3 control PgUp move to first screen in file. | ||
| - | 4 control PgDn move to last screen in file. | ||
| - | | ||
| - | 6 F9 erase current screen to blanks. | ||
| - | 7 F10 | ||
| - | 8 control Z | ||
| - | 9 alt | ||
| - | 10 control P quick print of current screen. | ||
| - | 11 alt | ||
| - | 12 alt | ||
| - | 13 alt | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 14 not modified | ||
| - | 0 \ VEDIT - SPECIAL | ||
| - | 1 control J join current line with one below. | ||
| - | 2 control P quick print of current screen. | ||
| - | 3 F1 display help screen. | ||
| - | 4 alt | ||
| - | 5 alt | ||
| - | 6 alt | ||
| - | 7 alt | ||
| - | 8 alt | ||
| - | 9 alt | ||
| - | 10 alt | ||
| - | 11 alt | ||
| - | 12 alt | ||
| - | 13 F10 | ||
| - | 14 ESC exit the editor. | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 15 not modified | ||
| - | 0 \ 12: | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 16 not modified | ||
| - | 0 \ Looping words, I/O words, Stack operatio | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 17 not modified | ||
| - | 0 \ Stack, Directory, Screen access | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 N L ( -- -- ) ( List the next screen. ) | ||
| - | 14 B L ( -- -- ) ( List the previous screen.) | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 18 not modified | ||
| - | 0 \ Operations with screen files. | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 5 \ Create a new screen file < | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 ( word.) | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 ( current screen file.) | ||
| - | |||
| - | |||
| - | Screen 19 not modified | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 20 not modified | ||
| - | 0 \ Check book register. | ||
| - | 1 \ Print balance forward. | ||
| - | 2 : BFWD ( bal bal ) 5 SPACES DUP . CR ; | ||
| - | 3 \ Display amount of next entry and the new subtotal. | ||
| - | 4 : +. ( s1 n | ||
| - | | ||
| - | 6 \ Done with this months checks, print the new total. | ||
| - | 7 : DONE ( s -- ) | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 21 not modified | ||
| - | 0 \ My checking account | ||
| - | 1 CR | ||
| - | 2 .( Balance forward ) 1000 | ||
| - | 3 .( Pay Check | ||
| - | 4 .( Mortgage | ||
| - | 5 .( Hydro | ||
| - | 6 .( Food ) -200 | ||
| - | 7 .( Telephone | ||
| - | 8 .( Entertainment | ||
| - | 9 .( Car Payment | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 22 not modified | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | 10 | ||
| - | 11 | ||
| - | 12 | ||
| - | 13 | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | |||
| - | Screen 23 not modified | ||
| - | 0 \ Hard copy screen documentation. | ||
| - | | ||
| - | 2 \ Print three screens starting with n on the printer. | ||
| - | 3 : HTRIAD | ||
| - | | ||
| - | | ||
| - | | ||
| - | 7 \ Send a top of page command to printer. | ||
| - | 8 : FFEED | ||
| - | | ||
| - | 10 | ||
| - | 11 \ Print screens | ||
| - | 12 : DOC ( first last -- ) | ||
| - | 13 1+ SWAP DO I HTRIAD FFEED 3 +LOOP ; | ||
| - | 14 | ||
| - | 15 | ||
| - | |||
| - | </ | ||
papierkorb/sample1.blk.1755359401.txt.gz · Zuletzt geändert: 2025-08-16 17:50 von mka