vd-archiv:listings:4d2008-04-listings
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| vd-archiv:listings:4d2008-04-listings [2017-05-21 21:38] – angelegt mka | vd-archiv:listings:4d2008-04-listings [2017-05-21 21:43] (aktuell) – [advf5] mka | ||
|---|---|---|---|
| Zeile 109: | Zeile 109: | ||
| ===== advf5 ===== | ===== advf5 ===== | ||
| - | advf5.zip | + | {{: |
| - | Adventures in Forth 5 - Alle Listings des Artikels ( flags.fs i2c_lmXX.fs ic2.fs sensor.fs filter_mean.fs ) | + | Viele Dateien, bitte selber auspacken. |
| + | |||
| + | ===== dumper.fs ===== | ||
| + | Dump - Kleine Helfer fürs amforth. | ||
| + | < | ||
| + | |||
| + | hex | ||
| + | |||
| + | ( item -- ) | ||
| + | : .item 4 u.r space ; \ asm ok | ||
| + | |||
| + | ( addr -- ) | ||
| + | : i? i@ .item ; | ||
| + | : e? e@ .item ; | ||
| + | : ? @ .item ; | ||
| + | |||
| + | ( addr n -- addr+n ) | ||
| + | : .icells | ||
| + | : .ecells | ||
| + | : .rcells | ||
| + | |||
| + | ( addr -- ) | ||
| + | : .addr cr .item space ; | ||
| + | |||
| + | ( addr1 len1 -- addr2 len2 ) | ||
| + | : trim swap fff8 and swap 7 or ; | ||
| + | |||
| + | ( addr len -- ) \ numbers are in hex. | ||
| + | : idump trim 0 ?do dup .addr 8 .icells | ||
| + | : edump trim 0 ?do dup .addr 8 .ecells | ||
| + | : dump trim 0 ?do dup .addr 8 . cells 10 +loop ; | ||
| + | |||
| + | \ tested ok on amforth-2.9 06.10.2008 mk | ||
| + | |||
| + | \ type a character | ||
| + | : .ascii ( c -- ) 7F and dup 20 < if drop 2E then emit ; \ ignore bit8 | ||
| + | |||
| + | \ type content of cell and its ascii values. | ||
| + | : .aa ( adr -- ) dup ff00 and ff / .ascii | ||
| + | |||
| + | \ inspect an address | ||
| + | ( adr -- ) | ||
| + | : i?? i@ dup .item .aa ; | ||
| + | : e?? e@ dup .item .aa ; | ||
| + | : ?? @ dup .item .aa ; | ||
| + | |||
| + | \ tested ok on amforth-2.9 08.10.2008 mk | ||
| + | \ ca. 222 cells of flash | ||
| + | \ finis | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | ===== euler9-turbozf.fs ===== | ||
| + | Euler 9 uho (VD-Heft 3/2008) 2008-08-24, Turbo-Forth-Adaption: | ||
| < | < | ||
| Zeile 182: | Zeile 237: | ||
| \ die DO-Grenzen.) Wie weit kann man mit meiner | \ die DO-Grenzen.) Wie weit kann man mit meiner | ||
| \ Turbo-Forth-Programm-Version (in 16-Bit-Breite) gehen? | \ Turbo-Forth-Programm-Version (in 16-Bit-Breite) gehen? | ||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| - | ===== dumper.fs ===== | ||
| - | Dump - Kleine Helfer fürs amforth. | ||
| - | < | ||
| - | |||
| - | hex | ||
| - | |||
| - | ( item -- ) | ||
| - | : .item 4 u.r space ; \ asm ok | ||
| - | |||
| - | ( addr -- ) | ||
| - | : i? i@ .item ; | ||
| - | : e? e@ .item ; | ||
| - | : ? @ .item ; | ||
| - | |||
| - | ( addr n -- addr+n ) | ||
| - | : .icells | ||
| - | : .ecells | ||
| - | : .rcells | ||
| - | |||
| - | ( addr -- ) | ||
| - | : .addr cr .item space ; | ||
| - | |||
| - | ( addr1 len1 -- addr2 len2 ) | ||
| - | : trim swap fff8 and swap 7 or ; | ||
| - | |||
| - | ( addr len -- ) \ numbers are in hex. | ||
| - | : idump trim 0 ?do dup .addr 8 .icells | ||
| - | : edump trim 0 ?do dup .addr 8 .ecells | ||
| - | : dump trim 0 ?do dup .addr 8 . cells 10 +loop ; | ||
| - | |||
| - | \ tested ok on amforth-2.9 06.10.2008 mk | ||
| - | |||
| - | \ type a character | ||
| - | : .ascii ( c -- ) 7F and dup 20 < if drop 2E then emit ; \ ignore bit8 | ||
| - | |||
| - | \ type content of cell and its ascii values. | ||
| - | : .aa ( adr -- ) dup ff00 and ff / .ascii | ||
| - | |||
| - | \ inspect an address | ||
| - | ( adr -- ) | ||
| - | : i?? i@ dup .item .aa ; | ||
| - | : e?? e@ dup .item .aa ; | ||
| - | : ?? @ dup .item .aa ; | ||
| - | |||
| - | \ tested ok on amforth-2.9 08.10.2008 mk | ||
| - | \ ca. 222 cells of flash | ||
| - | \ finis | ||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| - | ===== euler9-turbozf.fs ===== | ||
| - | Euler 9 uho (VD-Heft 3/2008) 2008-08-24, Turbo-Forth-Adaption: | ||
| - | < | ||
| - | |||
| - | |||
| </ | </ | ||
vd-archiv/listings/4d2008-04-listings.1495395534.txt.gz · Zuletzt geändert: 2017-05-21 21:38 von mka