This commit is contained in:
parent
09f10f9549
commit
a276417ce5
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
<<<<ððððÀÀÀÀ0000<<<<üüüüÿ€ÿ€ÿÿ€€ˆˆˆˆ
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,90 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: lib:adm
|
||||
: lib:adm ;
|
||||
|
||||
\ kommandoformen
|
||||
|
||||
ifnot: adm:fkt! \ ( fkt -- )
|
||||
: adm:fkt! b[ [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b! \ ( b fkt -- )
|
||||
: adm:fkt!b! b[ [a!] [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b@ \ ( fkt -- b )
|
||||
: adm:fkt!b@ b[ 0 [a!] [a!] [a@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!b@ \ ( b fkt -- b )
|
||||
: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!l@ \ ( fkt -- l )
|
||||
: adm:fkt!l@ b[ [a!] [a.l@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!s! \ ( s fkt -- )
|
||||
: adm:fkt!s! b[ [a!] [a.s!] ]b ;
|
||||
|
||||
\ administra-chipmanagment-funktionen
|
||||
|
||||
\ adm:setsound ( sfkt -- sstat ) - soundsystem verwalten
|
||||
\ sfkt:
|
||||
\ 0: hss-engine abschalten
|
||||
\ 1: hss-engine anschalten
|
||||
\ 2: dac-engine abschalten
|
||||
\ 3: dac-engine anschalten
|
||||
\ sstat - status/cognr startvorgang
|
||||
ifnot: adm:setsound
|
||||
: adm:setsound
|
||||
5C adm:fkt!b!b@ ;
|
||||
|
||||
\ adm:getspec ( -- spec ) - chipspezifikation abfragen
|
||||
\
|
||||
\ +---------- com
|
||||
\ | +-------- i2c
|
||||
\ | |+------- rtc
|
||||
\ | ||+------ lan
|
||||
\ | |||+----- sid
|
||||
\ | ||||+---- wav
|
||||
\ | |||||+--- hss
|
||||
\ | ||||||+-- bootfähig
|
||||
\ | |||||||+- dateisystem
|
||||
\ %00000000_00000000_00000000_01001111
|
||||
ifnot: adm:getspec
|
||||
: adm:getspec
|
||||
5D adm:fkt!l@ ;
|
||||
|
||||
\ adm:setsyssound ( syssnd -- ) - systemklänge
|
||||
\ syssnd = 0 - systemklänge aus
|
||||
\ syssnd = 1 - systemklänge an
|
||||
ifnot: adm:setsyssound
|
||||
: adm:setsyssound
|
||||
5E adm:fkt!b! ;
|
||||
|
||||
\ adm:getsoundsys ( -- sndsys ) - abfrage aktives soundsystem
|
||||
\ 0 - sound aus
|
||||
\ 1 - hss
|
||||
\ 2 - wav
|
||||
ifnot: adm:getsoundsys
|
||||
: adm:getsoundsys
|
||||
5F adm:fkt!b@ ;
|
||||
|
||||
\ adm:load ( cstr -- ) - neuen administra-code laden
|
||||
ifnot: adm:aload
|
||||
: adm:aload
|
||||
60 adm:fkt!s! ;
|
||||
|
||||
\ adm:getcogs ( -- cogs ) - anzahl der belegten cogs
|
||||
ifnot: adm:getcogs
|
||||
: adm:getcogs
|
||||
61 adm:fkt!b@ ;
|
||||
|
||||
\ adm:getver ( -- ver ) - abfrage der codeversion
|
||||
ifnot: adm:getver
|
||||
: adm:getver
|
||||
62 adm:fkt!l@ ;
|
||||
|
||||
\ adm:reset ( -- ) - reset administra
|
||||
ifnot: adm:reset
|
||||
: adm:reset
|
||||
63 adm:fkt! ;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,55 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: lib:ari
|
||||
: lib:ari ;
|
||||
|
||||
\ abs ( n1 -- abs_n1 ) absolute value of n1
|
||||
ifnot: abs
|
||||
: abs _execasm1>1 151 _cnip ;
|
||||
|
||||
\ u*/mod ( u1 u2 u3 -- u4 u5 ) u5 = (u1*u2)/u3, u4 is the
|
||||
\ remainder. Uses a 64bit intermediate result.
|
||||
ifnot: u*/mod
|
||||
: u*/mod rot2 um* rot um/mod ;
|
||||
|
||||
\ u*/ ( u1 u2 u3 -- u4 ) u4 = (u1*u2)/u3 Uses a 64bit
|
||||
\ intermediate result.
|
||||
ifnot: u*/
|
||||
: u*/ rot2 um* rot um/mod nip ;
|
||||
|
||||
\ sign ( n1 n2 -- n3 ) n3 is the xor of the sign bits of
|
||||
\ n1 and n2
|
||||
ifnot: sign
|
||||
: sign xor 80000000 and ;
|
||||
|
||||
\ */mod ( n1 n2 n3 -- n4 n5 ) n5 = (n1*n2)/n3, n4 is the
|
||||
\ remainder. Uses a 64bit intermediate result.
|
||||
ifnot: */mod
|
||||
: */mod 2dup sign >r abs rot dup r> sign >r abs rot abs
|
||||
um* rot um/mod r> if negate swap negate swap then ;
|
||||
|
||||
\ */ ( n1 n2 n3 -- n4 ) n4 = (n1*n2)/n3. Uses a 64bit
|
||||
\ intermediate result.
|
||||
ifnot: */
|
||||
: */ */mod nip ;
|
||||
|
||||
\ /mod ( n1 n2 -- n3 n4 ) \ signed divide & mod n4 = n1/n2,
|
||||
\ n3 is the remainder
|
||||
ifnot: /mod
|
||||
: /mod 2dup sign >r abs swap abs swap u/mod r> if negate swap
|
||||
negate swap then ;
|
||||
|
||||
\ * ( n1 n2 -- n1*n2) n1 multiplied by n2
|
||||
ifnot: *
|
||||
: * um* drop ;
|
||||
|
||||
\ / ( n1 n2 -- n1/n2) n1 divided by n2
|
||||
ifnot: /
|
||||
: / /mod nip ;
|
||||
|
||||
\ rnd ( -- n1 ) n1 is a random number from 00 - FF
|
||||
ifnot: rnd
|
||||
: rnd cnt COG@ 8 rshift cnt COG@ xor FF and ;
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,485 @@
|
|||
fl
|
||||
|
||||
hex
|
||||
|
||||
: mod:basics ;
|
||||
|
||||
\ Copyright (c) 2010 Sal Sanci
|
||||
\ Anpassung für Hive-System 2011 dr235
|
||||
|
||||
\ ------------------------------------------------------ BASICS
|
||||
|
||||
\ this words needs to align with the assembler code
|
||||
: _stptr 5 _cv ;
|
||||
: _sttop 2e _cv ;
|
||||
|
||||
\ _words ( cstr -- )
|
||||
: _words lastnfa
|
||||
begin
|
||||
2dup swap dup if npfx else 2drop -1 then
|
||||
if dup .strname space then
|
||||
nfa>next dup 0=
|
||||
until 2drop cr ;
|
||||
|
||||
\ words name ( -- ) prints the words in the forth dictionary
|
||||
: words parsenw _words ;
|
||||
|
||||
\ .long ( n -- ) emit 8 hex digits
|
||||
: .long dup 10 rshift .word .word ;
|
||||
|
||||
\ st? ( -- ) prints out the stack
|
||||
: st? ." ST: " _stptr COG@ 2+ dup _sttop <
|
||||
if _sttop swap - 0
|
||||
do _sttop 2- i - COG@ .long space loop
|
||||
else drop
|
||||
then cr ;
|
||||
|
||||
\ variable ( -- ) skip blanks parse the next word and create
|
||||
\ a variable, allocate a long, 4 bytes
|
||||
: variable
|
||||
lockdict create $C_a_dovarl w, 0 l, forthentry freedict ;
|
||||
|
||||
\ constant ( x -- ) skip blanks parse the next word and create
|
||||
\ a constant, allocate a long, 4 bytes
|
||||
: constant
|
||||
lockdict create $C_a_doconl w, l, forthentry freedict ;
|
||||
|
||||
\ waitpeq ( n1 n2 -- ) \ wait until state n1 is equal to
|
||||
\ ina anded with n2
|
||||
: waitpeq _execasm2>0 1E0 _cnip ;
|
||||
|
||||
\ locknew ( -- n2 ) allocate a lock, result is in n2, -1
|
||||
\ if unsuccessful
|
||||
: locknew -1 4 hubop -1 = if drop -1 then ;
|
||||
|
||||
\ (forget) ( cstr -- ) wind the dictionary back to the word
|
||||
\ which follows - caution
|
||||
: (forget) dup
|
||||
if
|
||||
find if
|
||||
pfa>nfa nfa>lfa dup here W! W@ wlastnfa W!
|
||||
else .cstr 3f emit cr then
|
||||
else drop then ;
|
||||
|
||||
\ forget ( -- ) wind the dictionary back to the word which
|
||||
\ follows - caution
|
||||
: forget parsenw (forget) ;
|
||||
|
||||
\ free ( -- ) display free main bytes and current cog longs
|
||||
: free dictend W@ here W@ - . ." bytes free - " par
|
||||
coghere W@ - . ." cog longs free" cr ;
|
||||
|
||||
\ ifnot: name ( -- ) - bedingte compilierung; wenn name schon
|
||||
\ im wörterbuch vorhanden, wird bis zum nächsten semikolon
|
||||
\ der eingabestrom ignoriert
|
||||
: ifnot: parsenw nip find if begin key 3B = until
|
||||
key drop then ;
|
||||
\ bei konstrukte, die keine doppelpunkdefinition sind, muss der
|
||||
\ block mit diesem Wort abgeschlossen werden
|
||||
: :; ;
|
||||
|
||||
\ --------------------------------------------------------- BUS
|
||||
|
||||
\ bin ( -- ) - umschaltung auf duales zahlensystem
|
||||
\ : bin 2 base W! ;
|
||||
\ +---------------------------- /hs
|
||||
\ |+--------------------------- /wr
|
||||
\ ||+-------------------------- busclk
|
||||
\ |||+------------------------- hbeat
|
||||
\ ||||+------------------------ al
|
||||
\ |||||+----------------------- /bel
|
||||
\ ||||||+---------------------- /adm
|
||||
\ |||||||+--------------------- /ram2
|
||||
\ ||||||||+-------------------- /ram1
|
||||
\ ||||||||| +--------- a0..10
|
||||
\ ||||||||| |
|
||||
\ ||||||||| | +- d0..7
|
||||
\ |||||||||+---------++------+
|
||||
\ 00000000000000000000000000000000
|
||||
\ bin 00000111111111111111111100000000 constant dinp hex
|
||||
\ bin 00000111111111111111111111111111 constant dout hex
|
||||
\ bin 00000010000000000000000000000000 constant boff hex
|
||||
\ bin 00000100011110000000000000000000 constant _s1 hex
|
||||
\ bin 00000000001110000000000000000000 constant _b1 hex
|
||||
\ bin 00000010001110000000000000000000 constant _b2 hex
|
||||
\ bin 00000110001110000000000000000000 constant _b3 hex
|
||||
\ bin 00000000010110000000000000000000 constant _a1 hex
|
||||
\ bin 00000010010110000000000000000000 constant _a2 hex
|
||||
\ bin 00000110010110000000000000000000 constant _a3 hex
|
||||
\ bin 00001000000000000000000000000000 constant ?hs hex
|
||||
|
||||
8000000 constant ?hs
|
||||
|
||||
: [inp] \ ( -- ) bus eingabe
|
||||
7FFFF00 dira COG! ; \ dinp
|
||||
|
||||
: [out] \ ( -- ) bus ausgabe
|
||||
7FFFFFF dira COG! ; \ dout
|
||||
|
||||
: [off] \ ( -- ) bus aus
|
||||
2000000 dira COG! 0 outa COG! ; \ boff
|
||||
|
||||
: [end] \ ( -- ) buskommunikation beendet
|
||||
4780000 outa COG! [inp] ; \ _s1
|
||||
|
||||
: [hs=1] \ ( -- ) wartet auf hs = 1
|
||||
?hs dup waitpeq ;
|
||||
|
||||
: [hs=0] \ ( -- ) warten auf hs = 0
|
||||
0 ?hs waitpeq ;
|
||||
|
||||
: [s!] \ ( c ctrl -- ) sende 8 bit an einen slave
|
||||
[out] [hs=1] swap ff and or outa COG! [hs=0] [end] ;
|
||||
|
||||
: [s@] \ ( ctrl -- c ) empfängt 8 bit von einem slave
|
||||
[inp] [hs=1] outa COG! [hs=0] ina COG@ ff and [end] ;
|
||||
|
||||
: [b!] \ ( c -- ) sende 8 bit an bellatrix
|
||||
2380000 [s!] ; \ _b2
|
||||
|
||||
: [a!] \ ( c -- ) sende 8 bit an administra
|
||||
2580000 [s!] ; \ _a2
|
||||
|
||||
: [b@] \ ( -- c ) empfängt 8 bit von bellatrix
|
||||
6380000 [s@] ; \ _b3
|
||||
|
||||
: [a@] \ ( -- c ) empfängt 8 bit von administra
|
||||
6580000 [s@] ; \ _a3
|
||||
|
||||
: <8 \ ( -- )
|
||||
8 lshift ;
|
||||
|
||||
\ [b.l!] ( 32b -- ) - long an bellatrix senden
|
||||
: [b.l!]
|
||||
dup 18 rshift [b!]
|
||||
dup 10 rshift [b!]
|
||||
dup 8 rshift [b!]
|
||||
[b!] ;
|
||||
|
||||
\ [b.l@] ( -- 32b ) - long von bellatrix einlesen
|
||||
: [b.l@]
|
||||
[b@] <8
|
||||
[b@] or <8
|
||||
[b@] or <8
|
||||
[b@] or ;
|
||||
|
||||
\ [a.s@] ( -- ) - einen cstring von administra empfangen
|
||||
\ und im pad speichern
|
||||
: [a.s@]
|
||||
[a@] pad 2dup C! 1+ swap
|
||||
0 do dup [a@] swap C! 1+ loop drop ;
|
||||
|
||||
\ [a.s!] ( cstr -- ) - einen cstring an administra senden
|
||||
: [a.s!]
|
||||
dup C@ dup [a!] \ ( -- cstr len ) len senden
|
||||
0 do \ ( cstr len -- cstr )
|
||||
1+ dup C@ [a!] \ ( cstr -- cstr+1 ) zeichen senden
|
||||
loop drop ; \ ( cstr -- )
|
||||
|
||||
\ [a.w@] ( -- 16b ) - 16bit-wert von administra einlesen
|
||||
: [a.w@]
|
||||
[a@] <8 [a@] or ;
|
||||
|
||||
\ [a.l!] ( 32b -- ) - long an administra senden
|
||||
: [a.l!]
|
||||
dup 18 rshift [a!]
|
||||
dup 10 rshift [a!]
|
||||
dup 8 rshift [a!]
|
||||
[a!] ;
|
||||
|
||||
\ [a.l@] ( -- 32b ) - long von administra einlesen
|
||||
: [a.l@]
|
||||
[a@] <8
|
||||
[a@] or <8
|
||||
[a@] or <8
|
||||
[a@] or ;
|
||||
|
||||
wvariable b[lock] \ nummer der semaphore für den
|
||||
\ zugriff auf die bus-hardware
|
||||
|
||||
\ b[ ( -- ) bus belegen; wartet bis semaphore freigegeben ist
|
||||
: b[ begin b[lock] W@ lockset -1 <> until [inp] ;
|
||||
|
||||
\ ]b ( -- ) bus freigeben
|
||||
\ ! busclk bleibt auf ausgabe, da dieses signal sonst
|
||||
\ kein definierten pegel besitzt !
|
||||
: ]b [off] b[lock] W@ lockclr drop ;
|
||||
|
||||
\ administra-kommandoformate
|
||||
|
||||
: b[a! b[ [a!] ;
|
||||
: b[a!a! b[ [a!] [a!] ;
|
||||
: adm:fkt! b[a! ]b ; \ ( fkt -- )
|
||||
: adm:fkt!b@ b[a! [a@] ]b ; \ ( fkt -- b )
|
||||
: adm:fkt!b! b[a!a! ]b ; \ ( b fkt -- )
|
||||
: adm:fkt!b!b@ b[a!a! [a@] ]b ; \ ( b fkt -- b )
|
||||
: adm:fkt!s@ b[a! [a.s@] ]b ; \ ( fkt -- )
|
||||
: adm:fkt!s!b@ b[a! [a.s!] [a@] ]b ; \ ( s fkt -- b )
|
||||
: adm:fkt!b!l@ b[a!a! [a.l@] ]b ; \ ( b fkt -- l )
|
||||
|
||||
\ ----------------------------------------------------- SD0.LIB
|
||||
|
||||
\ marker-funktionen
|
||||
|
||||
\ adm:dmact ( dmnr -- ) - marker aktivieren
|
||||
: adm:dmact 19 adm:fkt!b!b@ drop ;
|
||||
|
||||
\ adm:dmset ( dmnr -- ) - marker setzen
|
||||
: adm:dmset 1A adm:fkt!b! ;
|
||||
|
||||
\ dateisystem-funktionen
|
||||
|
||||
\ adm:volname ( -- ) - name des volumes im pad ablegen
|
||||
: adm:volname 0C adm:fkt!s@ ;
|
||||
|
||||
\ adm:mount ( -- err ) - medium mounten
|
||||
: adm:mount 01 adm:fkt!b@ ;
|
||||
|
||||
\ adm:unmount ( -- err ) - medium unmounten
|
||||
: adm:unmount 18 adm:fkt!b@ ;
|
||||
|
||||
\ adm:checkmounted ( -- t/f )
|
||||
: adm:checkmounted 0D adm:fkt!b@ ;
|
||||
|
||||
\ adm:diropen ( -- ) - verzeichnisabfrage initialisieren
|
||||
: adm:diropen 02 adm:fkt! ;
|
||||
|
||||
\ adm:nextfile ( -- st )
|
||||
\ st = 0 - keine gültige datei
|
||||
\ st = 1 - dateiname im pad gültig
|
||||
\ bei gültigem eintrag befindet sich der dateiname im pad
|
||||
: adm:nextfile b[ 3 [a!] [a@] dup if [a.s@] then ]b ;
|
||||
|
||||
\ adm:fattrib ( nr -- attrib ) - dateiattribut abfragen
|
||||
: adm:fattrib 0B adm:fkt!b!l@ ;
|
||||
|
||||
\ adm:chdir ( cstr -- err ) - verzeichnis öffnen
|
||||
: adm:chdir 16 adm:fkt!s!b@ ;
|
||||
|
||||
\ adm:getc ( -- c ) - ein zeichen aus der geöffneten datei lesen
|
||||
: adm:getc 06 adm:fkt!b@ ;
|
||||
|
||||
\ adm:eof ( -- eof ) - abfrage ob end of file erreicht ist
|
||||
: adm:eof 1E adm:fkt!b@ ;
|
||||
|
||||
\ adm:open ( cstr modus -- err ) - datei öffnen
|
||||
\ modus "R" $52 - Read
|
||||
\ modus "W" $57 - Write
|
||||
\ modus "A" $41 - Append
|
||||
: adm:open b[ 4 [a!] [a!] [a.s!] [a@] ]b ;
|
||||
|
||||
\ adm:close ( -- ) - datei schließen
|
||||
: adm:close 05 adm:fkt!b@ ;
|
||||
|
||||
\ ----------------------------------------------------- SCR.LIB
|
||||
|
||||
\ [dscr] ( scrnr -- ) display-screen setzen
|
||||
: [dscr] 0 [b!] 59 [b!] [b!] ;
|
||||
|
||||
\ [wscr] ( scrnr -- ) schreib-screen setzen
|
||||
: [wscr] 0 [b!] 58 [b!] [b!] ;
|
||||
|
||||
\ [key?] ( -- c ) - ungekapselte tastaturstatusabfrage
|
||||
: [key?] 0 [b!] 1 [b!] [b@] ;
|
||||
|
||||
\ [key] ( -- c ) - ungekapselte tastaturabfrage
|
||||
: [key] 0 [b!] 2 [b!] [b@] ;
|
||||
|
||||
\ [emit] ( c -- ) - ungekapselte zeichenausgabe
|
||||
: [emit] emit? if emit then ;
|
||||
|
||||
\ ----------------------------------------------------- TOOLS
|
||||
|
||||
\ cls ( -- ) - screen löschen
|
||||
: cls 01 emit ;
|
||||
|
||||
\ .tab ( -- ) - tabulator
|
||||
: .tab 09 emit ;
|
||||
|
||||
\ .err ( err -- ) - fehlermeldung ausgeben
|
||||
\ 0 no error
|
||||
\ 1 fsys unmounted
|
||||
\ 2 fsys corrupted
|
||||
\ 3 fsys unsupported
|
||||
\ 4 not found
|
||||
\ 5 file not found
|
||||
\ 6 dir not found
|
||||
\ 7 file read only
|
||||
\ 8 end of file
|
||||
\ 9 end of directory
|
||||
\ 10 end of root
|
||||
\ 11 dir is full
|
||||
\ 12 dir is not empty
|
||||
\ 13 checksum error
|
||||
\ 14 reboot error
|
||||
\ 15 bpb corrupt
|
||||
\ 16 fsi corrupt
|
||||
\ 17 dir already exist
|
||||
\ 18 file already exist
|
||||
\ 19 out of disk free space
|
||||
\ 20 disk io error
|
||||
\ 21 command not found
|
||||
\ 22 timeout
|
||||
\ 23 parameter error
|
||||
: .err dup if ERR then drop ;
|
||||
|
||||
\ .pad ( -- ) - ausgabe eines strings im pad
|
||||
: .pad pad .cstr ;
|
||||
|
||||
\ .vname ( -- ) - ausgabe des namens der eingelegten sd-card
|
||||
: .vname adm:volname .pad ;
|
||||
|
||||
\ mount ( -- ) - sd-card mounten
|
||||
: mount adm:mount .err ." Medium : " .vname cr ;
|
||||
|
||||
\ unmount ( -- ) - sd-card unmounten
|
||||
: unmount adm:unmount .err ;
|
||||
|
||||
\ mount? ( -- ) - test ob medium mounted ist
|
||||
\ wird als exception gewertet
|
||||
: mount? adm:checkmounted 0= if 1 .err then ;
|
||||
|
||||
\ padbl ( -- ) fills this cogs pad with blanks
|
||||
: padbl pad padsize bl fill ;
|
||||
|
||||
\ .entry ( -- st ) - einen verzeichniseintrag ausgeben
|
||||
: .entry
|
||||
adm:nextfile 13 adm:fattrib if 0F emit else space then
|
||||
dup if .pad .tab then ;
|
||||
|
||||
\ .len ( st -- st ) - dateilänge ausgeben
|
||||
: .len dup if 0 adm:fattrib . then ;
|
||||
|
||||
\ lscnt ( cnt1 st -- cnt2 st ) - spaltenformatierung für ls
|
||||
\ cnt - spaltenzähler, st - flag verzeichnisende
|
||||
: lscnt
|
||||
swap 1+ dup 4 = if cr drop 0 else .tab then swap ;
|
||||
|
||||
\ lsl ( -- ) - verzeichnis anzeigen, long-format
|
||||
: lsl mount?
|
||||
adm:diropen begin .entry .len cr 0= until padbl ;
|
||||
|
||||
\ ls ( -- ) - verzeichnis in spalten anzeigen
|
||||
: ls mount?
|
||||
adm:diropen 0 begin .entry lscnt 0= until drop padbl cr ;
|
||||
|
||||
\ cd name ( -- ) - verzeichnis wechseln
|
||||
: cd mount? parsenw adm:chdir .err ;
|
||||
|
||||
\ open name ( -- ) - datei lesend öffnen und auf fehler prüfen
|
||||
: open
|
||||
mount? parsenw dup
|
||||
if 52 adm:open else drop 23 then .err ;
|
||||
|
||||
\ close ( -- ) - geöffnete datei schließen
|
||||
: close adm:close .err ;
|
||||
|
||||
\ dload name - datei compilieren; log im gleichen screen
|
||||
\ load name - datei compilieren; log screen 3
|
||||
\ sys name - datei aus sys compilieren; log screen 3
|
||||
\ die datei wird in der nächsten freien cog compiliert
|
||||
\ fl ist für load nicht nötig und bringt in dem kontext
|
||||
\ die cog-zuordnung durcheinander
|
||||
|
||||
: (load)
|
||||
begin adm:getc emit adm:eof until ;
|
||||
|
||||
: (dload)
|
||||
open cogid nfcog iolink
|
||||
(load)
|
||||
cogid iounlink close ;
|
||||
|
||||
: (sload)
|
||||
open cogid 3 dup b[ [wscr] ]b iolink
|
||||
(load)
|
||||
cogid dup b[ [wscr] ]b iounlink close ;
|
||||
|
||||
: load
|
||||
." Loading... " (sload) ;
|
||||
|
||||
: dload
|
||||
(dload) ;
|
||||
|
||||
: sys
|
||||
2 adm:dmset 1 adm:dmact ." Loading... " (sload) 2 adm:dmact ;
|
||||
|
||||
\ ------------------------------------------------- SPIN-LOADER
|
||||
|
||||
\ (spin) ( cstr -- ) - c" reg.sys" (spin)
|
||||
: (spin)
|
||||
dup C@ 1+
|
||||
0 do
|
||||
dup i + C@
|
||||
ldvar 1+ i + C!
|
||||
loop drop
|
||||
1 ldvar C!
|
||||
;
|
||||
|
||||
\ spin name ( -- ) - spinobjekt "name" starten
|
||||
: spin
|
||||
parsenw (spin) ;
|
||||
|
||||
\ regime ( -- ) - startet dir trios-cli "regime"
|
||||
: regime
|
||||
0 adm:dmact
|
||||
c" reg.sys" (spin) ;
|
||||
|
||||
\ ----------------------------------------------------- DRV:INT
|
||||
|
||||
|
||||
wvariable icog \ nummer der drv:int-cog
|
||||
wvariable lcog \ nummer interaktiven cog
|
||||
|
||||
\ xint ( n -- ) io von cog n auf drv:int umschalten
|
||||
: xint icog W@ ioconn ;
|
||||
|
||||
\ [cogscr] ( nr -- ) - umschaltung screen + cog
|
||||
: [cogscr]
|
||||
dup 2dup lcog W! xint [dscr] [wscr] ;
|
||||
|
||||
\ =n ( n1 n2 -- n1 n1=n2 )
|
||||
: =n 2dup = swap drop ;
|
||||
|
||||
\ [esc] ( -- ) - manager für esc-funktionen im drv:int
|
||||
: [esc]
|
||||
begin [key?] until [key]
|
||||
71 =n if 1b [emit] then \ esc - q : esc-char/quit
|
||||
31 =n if 1 [cogscr] then \ esc - 1 : cog-screen 0
|
||||
32 =n if 2 [cogscr] then \ esc - 2 : cog-screen 1
|
||||
33 =n if 3 [cogscr] then \ esc - 3 : cog-screen 2
|
||||
62 =n if lcog W@ cogreset then \ esc - b : break (cog)
|
||||
72 =n if reboot then \ esc - r : reset (chip)
|
||||
drop ; \ esc - esc : pause
|
||||
|
||||
\ drv:int ( -- ) treiber für bellatrix-terminal
|
||||
\ diese cog fragt in einer endlosschleife ab, ob zeichen
|
||||
\ versendet oder empfangen werden sollen. um die zeichenausgabe
|
||||
\ zu beschleunigen, findet ausgabe und eingabe in einem
|
||||
\ verhältnis von 512:1 statt. per esc-code können spezielle
|
||||
\ funktionen im driver ausgelöst werden.
|
||||
: drv:int
|
||||
\ name und typ der cog einstellen
|
||||
cogid dup cogstate 10 swap C! c" drv:int" over
|
||||
cognumpad ccopy
|
||||
20 delms 0D emit \ verzögertes cr für prompt
|
||||
begin
|
||||
\ input --> vga/video
|
||||
200 0 do key? \ eingabezeichen vorhanden?
|
||||
if key b[ [b!] ]b then loop \ cog ---> bel.vga
|
||||
\ output <-- keyboard
|
||||
b[ [key?] \ tastenstatus bellatrix?
|
||||
if [key] dup 1b = if drop [esc] else [emit] thens ]b
|
||||
0 until ;
|
||||
|
||||
\ ----------------------------------------------------- SYSINIT
|
||||
|
||||
: start \ ( -- ) initialisierung hive
|
||||
locknew b[lock] W! \ b-semaphore
|
||||
0 dup cogstate 10 swap C! c" drv:ldr" over
|
||||
cognumpad ccopy
|
||||
5 dup icog W! c" drv:int" swap cogx 1 b[ [cogscr] ]b ;
|
||||
: _ob onboot ;
|
||||
: onboot _ob start ;
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: lib:bel
|
||||
: lib:bel ;
|
||||
|
||||
\ kommandoformate
|
||||
|
||||
ifnot: bel:fkt! \ ( fkt -- )
|
||||
: bel:fkt! b[ 0 [b!] [b!] ]b ;
|
||||
|
||||
ifnot: bel:fkt!b! \ ( b fkt -- )
|
||||
: bel:fkt!b! b[ 0 [b!] [b!] [b!] ]b ;
|
||||
|
||||
ifnot: bel:fkt!b!l@ \ ( b fkt -- l )
|
||||
: bel:fkt!b!l@ b[ 0 [b!] [b!] [b!] [b.l@] ]b ;
|
||||
|
||||
ifnot: bel:fkt!b!l! \ ( l b fkt -- )
|
||||
: bel:fkt!b!l! b[ 0 [b!] [b!] [b!] [b.l!] ]b ;
|
||||
|
||||
ifnot: bel:fkt!l@ \ ( fkt -- l )
|
||||
: bel:fkt!l@ b[ 0 [b!] [b!] [b.l@] ]b ;
|
||||
|
||||
ifnot: bel:fkt!b@ \ ( fkt -- b )
|
||||
: bel:fkt!b@ b[ 0 [b!] [b!] [b@] ]b ;
|
||||
|
||||
\ chipmanagment-funktionen
|
||||
|
||||
ifnot: bel:wscr \ ( scrnr -- ) - schreibscreen setzen
|
||||
: bel:wscr 58 bel:fkt!b! ;
|
||||
|
||||
ifnot: bel:dscr \ ( scrnr -- ) - displayscreen setzen
|
||||
: bel:dscr 59 bel:fkt!b! ;
|
||||
|
||||
ifnot: bel:getcol \ ( colnr -- col ) - farbe abfragen
|
||||
: bel:getcol 5A bel:fkt!b!l@ ;
|
||||
|
||||
ifnot: bel:setcol \ ( col colnr -- ) - farbe setzen
|
||||
: bel:setcol 5B bel:fkt!b!l! ;
|
||||
|
||||
ifnot: bel:getresx \ ( -- resx ) - abfrage x-auflösung
|
||||
: bel:getresx 5C bel:fkt!l@ ;
|
||||
|
||||
ifnot: bel:getresy \ ( -- resy ) - abfrage y-auflösung
|
||||
: bel:getresy 5D bel:fkt!l@ ;
|
||||
|
||||
ifnot: bel:getcols \ ( -- cols ) - abfrage textspalten
|
||||
: bel:getcols 5E bel:fkt!b@ ;
|
||||
|
||||
ifnot: bel:getrows \ ( -- rows ) - abfrage textzeilen
|
||||
: bel:getrows 5F bel:fkt!b@ ;
|
||||
|
||||
ifnot: bel:getcogs \ ( -- cogs ) - abfrage belegte cogs
|
||||
: bel:getcogs 60 bel:fkt!b@ ;
|
||||
|
||||
ifnot: bel:getspec \ ( -- spec ) - abfrage codespezifikation
|
||||
: bel:getspec 61 bel:fkt!l@ ;
|
||||
|
||||
ifnot: bel:getver \ ( -- ver ) - abfrage codeversion
|
||||
: bel:getver 62 bel:fkt!l@ ;
|
||||
|
||||
ifnot: bel:load \ ( cstr -- ) - bellatrix-code laden
|
||||
: bel:load
|
||||
52 adm:open .err \ datei öffnen
|
||||
b[
|
||||
0 [b!] 63 [b!] \ bella-loader starten
|
||||
10 0 do 06 [a!] [a@] [b!] loop \ header einlesen
|
||||
0A [a!] 0 [a.l!] \ 0 adm:seek
|
||||
[b@] <8 [b@] or \ dateilänge empfangen
|
||||
0 do 06 [a!] [a@] [b!] loop \ datei senden
|
||||
]b
|
||||
adm:close .err \ datei schließen
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,74 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: lib:cog
|
||||
: lib:cog ;
|
||||
|
||||
\ cog special register
|
||||
|
||||
ifnot: ctra 1F8 wconstant ctra :;
|
||||
ifnot: ctrb 1F9 wconstant ctrb :;
|
||||
ifnot: frqa 1FA wconstant frqa :;
|
||||
ifnot: frqb 1FB wconstant frqb :;
|
||||
ifnot: phsa 1FC wconstant phsa :;
|
||||
ifnot: phsb 1FD wconstant phsb :;
|
||||
ifnot: vcfg 1FE wconstant vcfg :;
|
||||
ifnot: vscl 1FF wconstant vscl :;
|
||||
|
||||
\ this words needs to align with the assembler code
|
||||
|
||||
ifnot: _faddrmask : _faddrmask 1 _cv ;
|
||||
ifnot: _flongmask : _flongmask 2 _cv ;
|
||||
ifnot: _stptr : _stptr 5 _cv ;
|
||||
ifnot: _sttos : _sttos 7 _cv ;
|
||||
ifnot: _treg1 : _treg1 8 _cv ;
|
||||
ifnot: _treg2 : _treg2 9 _cv ;
|
||||
ifnot: _treg3 : _treg3 a _cv ;
|
||||
ifnot: _treg4 : _treg4 b _cv ;
|
||||
ifnot: _treg5 : _treg5 c _cv ;
|
||||
ifnot: _treg6 : _treg6 d _cv ;
|
||||
ifnot: _stbot : _stbot e _cv ;
|
||||
ifnot: _sttop : _sttop 2e _cv ;
|
||||
ifnot: _rsbot : _rsbot _sttop ;
|
||||
|
||||
\ waitcnt ( n1 n2 -- n1 ) \ wait until n1, add n2 to n1
|
||||
ifnot: waitcnt
|
||||
: waitcnt _execasm2>1 1F1 _cnip ;
|
||||
|
||||
\ waitpeq ( n1 n2 -- ) \ wait until state n1 is equal to
|
||||
\ ina anded with n2
|
||||
ifnot: waitpeq
|
||||
: waitpeq _execasm2>0 1E0 _cnip ;
|
||||
|
||||
\ waitpne ( n1 n2 -- ) \ wait until state n1 is not equal
|
||||
\ to ina anded with n2
|
||||
ifnot: waitpne
|
||||
: waitpne _execasm2>0 1E8 _cnip ;
|
||||
|
||||
\ lockret ( n1 -- ) deallocate a lock, previously allocated
|
||||
\ via locknew
|
||||
ifnot: lockret
|
||||
: lockret 5 hubop 2drop ;
|
||||
|
||||
\ locknew ( -- n2 ) allocate a lock, result is in n2, -1
|
||||
\ if unsuccessful
|
||||
ifnot: locknew
|
||||
: locknew -1 4 hubop -1 = if drop -1 then ;
|
||||
|
||||
\ cog+ ( -- ) add a forth cog
|
||||
ifnot: cog+
|
||||
: cog+ (cog+) ;
|
||||
|
||||
\ (cog-) ( -- ) stop first forth cog, cannot be executed form
|
||||
\ the first forth cog
|
||||
ifnot: (cog-)
|
||||
: (cog-) nfcog cogstop ;
|
||||
|
||||
\ cog- ( -- ) stop first forth cog, cannot be executed form
|
||||
\ the first forth cog
|
||||
ifnot: cog-
|
||||
: cog- (cog-) ;
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: mod:debug
|
||||
: mod:debug ;
|
||||
|
||||
\ keycode ( -- ) - anzeige der tastaturcodes
|
||||
ifnot: keycode
|
||||
: keycode
|
||||
begin
|
||||
0 key? if
|
||||
drop key dup dup ." code : " emit ." : " . cr 1B =
|
||||
then until ;
|
||||
|
||||
\
|
||||
\ Noisy reset messages
|
||||
\
|
||||
\ print out a reset message to the console
|
||||
\ (rsm) ( n -- ) n is the last status
|
||||
\ 0011FFFF - stack overflow
|
||||
\ 0012FFFF - return stack overflow
|
||||
\ 0021FFFF - stack underflow
|
||||
\ 0022FFFF - return stack underflow
|
||||
\ 8100FFFF - no free cogs
|
||||
\ 8200FFFF - no free main memory
|
||||
\ 8400FFFF - fl no free main memory
|
||||
\ 8500FFFF - no free cog memory
|
||||
\ 8800FFFF - eeprom write error
|
||||
\ 9000FFFF - eeprom read error
|
||||
|
||||
: (rsm) state W@ 2 and 0= swap
|
||||
\ process the last status
|
||||
dup 0= if c" ok" else
|
||||
dup FF11 = if c" DST OVER" else
|
||||
dup FF12 = if c" RST OVER" else
|
||||
dup FF21 = if c" DST LOW" else
|
||||
dup FF22 = if c" RST LOW" else
|
||||
dup 8001 = if c" COGs OUT" else
|
||||
dup 8002 = if c" hMEM OUT" else
|
||||
dup 8003 = if c" ROM WR" else
|
||||
dup 8004 = if c" FL" else
|
||||
dup 8005 = if c" cMEM OUT" else
|
||||
dup 8006 = if c" ROM RD" else
|
||||
c" ?"
|
||||
thens
|
||||
rot if
|
||||
lockdict cr c" ERR : " .cstr swap . .cstr cr freedict
|
||||
else 2drop then ;
|
||||
: onreset (rsm) 4 state orC! ;
|
||||
|
||||
\ .byte ( n1 -- )
|
||||
: .byte <# # # #> .cstr ;
|
||||
|
||||
\ [if (dumpb)
|
||||
: (dumpb) cr over .addr space dup .addr _ecs bounds ; ]
|
||||
|
||||
\ [if (dumpm)
|
||||
: (dumpm) cr .word _ecs ; ]
|
||||
|
||||
\ [if (dumpe)
|
||||
: (dumpe) tbuf 8 bounds do i C@ .byte space loop 2 spaces tbuf 8 bounds do i C@ dup bl < if drop 2e then emit loop ; ]
|
||||
|
||||
\ dump ( adr cnt -- ) uses tbuf
|
||||
[if dump
|
||||
: dump (dumpb) do i (dumpm) i tbuf 8 cmove (dumpe) 8 +loop cr ; ]
|
Binary file not shown.
|
@ -0,0 +1,40 @@
|
|||
|
||||
Reset-Fehlercodes:
|
||||
|
||||
0011FFFF - stack overflow
|
||||
0012FFFF - return stack overflow
|
||||
0021FFFF - stack underflow
|
||||
0022FFFF - return stack underflow
|
||||
8100FFFF - no free cogs
|
||||
8200FFFF - no free main memory
|
||||
8400FFFF - fl no free main memory
|
||||
8500FFFF - no free cog memory
|
||||
8800FFFF - eeprom write error
|
||||
9000FFFF - eeprom read error
|
||||
|
||||
.err-Fehlercodes:
|
||||
|
||||
0 no error
|
||||
1 fsys unmounted
|
||||
2 fsys corrupted
|
||||
3 fsys unsupported
|
||||
4 not found
|
||||
5 file not found
|
||||
6 dir not found
|
||||
7 file read only
|
||||
8 end of file
|
||||
9 end of directory
|
||||
10 end of root
|
||||
11 dir is full
|
||||
12 dir is not empty
|
||||
13 checksum error
|
||||
14 reboot error
|
||||
15 bpb corrupt
|
||||
16 fsi corrupt
|
||||
17 dir already exist
|
||||
18 file already exist
|
||||
19 out of disk free space
|
||||
20 disk io error
|
||||
21 command not found
|
||||
22 timeout
|
||||
23 parameter error
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,155 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: mod:hplay
|
||||
: mod:hplay ;
|
||||
|
||||
\ kommandoformate
|
||||
|
||||
ifnot: adm:fkt! \ ( fkt -- )
|
||||
: adm:fkt! b[ [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b! \ ( b fkt -- )
|
||||
: adm:fkt!b! b[ [a!] [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!w@ \ ( b fkt -- w )
|
||||
: adm:fkt!b!w@ b[ [a!] [a!] [a.w@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!s!b@ \ ( cstr fkt -- b )
|
||||
: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ;
|
||||
|
||||
ifnot: bel:fkt!b@ \ ( fkt -- b )
|
||||
: bel:fkt!b@ b[ 0 [b!] [b!] [b@] ]b ;
|
||||
|
||||
ifnot: bel:char \ ( b -- )
|
||||
: bel:char b[ [b!] ]b ;
|
||||
|
||||
\ hss-funktionen
|
||||
|
||||
ifnot: hss:load \ ( cstr -- err ) - hss-datei laden
|
||||
: hss:load dup if 64 adm:fkt!s!b@ then ;
|
||||
|
||||
ifnot: hss:play \ ( -- ) - datei im puffer abspielen
|
||||
: hss:play 65 adm:fkt! ;
|
||||
|
||||
ifnot: hss:stop \ ( -- ) - player stop
|
||||
: hss:stop 66 adm:fkt! ;
|
||||
|
||||
ifnot: hss:reg \ hreg ( regnr -- 16b )
|
||||
: hss:reg 69 b[ [a!] [a!] [a.w@] ]b ;
|
||||
|
||||
ifnot: hss:vol \ hvol ( vol -- ) - lautstärke 0..15
|
||||
: hss:vol 6A adm:fkt!b! ;
|
||||
|
||||
\ keyboard-funktionen
|
||||
|
||||
ifnot: key:stat \ ( -- stat ) - tastenstatus abfragen
|
||||
: key:stat 1 bel:fkt!b@ ;
|
||||
|
||||
\ steuerzeichen
|
||||
|
||||
ifnot: scr:cls \ ( -- ) - screen löschen
|
||||
: scr:cls 01 bel:char ;
|
||||
|
||||
ifnot: scr:home \ ( -- ) - cursor oben links
|
||||
: scr:home 02 bel:char ;
|
||||
|
||||
ifnot: scr:curon \ ( -- ) - cursor anschalten
|
||||
: scr:curon 04 bel:char ;
|
||||
|
||||
ifnot: scr:curoff \ ( -- ) - cursor abschalten
|
||||
: scr:curoff 05 bel:char ;
|
||||
|
||||
\ sd0-funktionen
|
||||
|
||||
\ adm:diropen ( -- ) - verzeichnisabfrage initialisieren
|
||||
ifnot: adm:diropen
|
||||
: adm:diropen
|
||||
02 adm:fkt! ;
|
||||
|
||||
\ adm:nextfile ( -- st )
|
||||
\ st = 0 - keine gültige datei
|
||||
\ st = 1 - dateiname im pad gültig
|
||||
\ bei gültigem eintrag befindet sich der dateiname im pad
|
||||
ifnot: adm:nextfile
|
||||
: adm:nextfile
|
||||
b[ 03 [a!] [a@] dup if [a.s@] then ]b ;
|
||||
|
||||
\ metafunktionen
|
||||
|
||||
\ hload name ( -- ) - hss-datei in player laden
|
||||
|
||||
ifnot: hload
|
||||
: hload mount? parsenw hss:load .err ;
|
||||
|
||||
ifnot: .hset
|
||||
: .hset \ ( shift -- ) - eine registersatz ausgeben
|
||||
5 0 do dup i + hss:reg .word space loop drop ;
|
||||
|
||||
ifnot: .hreg
|
||||
: .hreg \ ( -- ) - register ausgeben
|
||||
14 0 do i .hset cr 5 +loop ;
|
||||
|
||||
ifnot: fadeout
|
||||
: fadeout \ ( -- ) - sound langsam ausblenden
|
||||
f 0 do e i - hss:vol 50 delms loop ;
|
||||
|
||||
ifnot: end?
|
||||
: end? \ ( cnt -- flag ) - abfrage nach cnt wiederholungen
|
||||
4 hss:reg = ;
|
||||
|
||||
ifnot: hwait
|
||||
: hwait \ ( -- flag ) - wartet auf songende oder taste
|
||||
begin 50 delms key? 2 end? or until key drop ;
|
||||
|
||||
ifnot: hreg..
|
||||
: hreg.. \ ( -- ) - fortlaufende anzeige register
|
||||
scr:curoff scr:cls begin scr:home .hreg 2 end? until
|
||||
scr:curon fadeout hss:stop ;
|
||||
|
||||
ifnot: (hplay)
|
||||
: (hplay) \ ( cstr -- )
|
||||
." Datei : " dup .cstr hss:load .err f hss:vol hss:play
|
||||
hwait fadeout hss:stop 100 delms cr ;
|
||||
|
||||
\ hplay name ( -- ) - datei abspielen
|
||||
ifnot: hplay
|
||||
: hplay
|
||||
hload hss:play ;
|
||||
|
||||
\ files? ( -- cnt ) - anzahl dateien im dir
|
||||
ifnot: files?
|
||||
: files?
|
||||
adm:diropen
|
||||
0 begin adm:nextfile swap 1+ swap 0= until 3 - padbl ;
|
||||
|
||||
\ filenr? ( nr -- )
|
||||
ifnot: filenr?
|
||||
: filenr?
|
||||
adm:diropen
|
||||
0 do adm:nextfile drop loop ;
|
||||
|
||||
\ hdirplay ( -- ) - gesamtes verzeichnis abspielen
|
||||
\ im verzeichnis dürfen nur hss-dateien sein!
|
||||
ifnot: hdirplay
|
||||
: hdirplay
|
||||
decimal files? dup ." Dateien : " . cr
|
||||
0 do i dup 1 + . 3 + filenr? pad (hplay) loop padbl hex ;
|
||||
|
||||
: (hp) ." play : " dup .cstr hss:load .err ;
|
||||
|
||||
ifnot: playliste
|
||||
: playliste
|
||||
c" kw.hss" (hplay)
|
||||
c" genes.hss" (hplay)
|
||||
c" greenpuz.hss" (hplay)
|
||||
c" hssintro.hss" (hplay)
|
||||
c" kali766.hss" (hplay)
|
||||
c" machine.hss" (hplay)
|
||||
c" metroid.hss" (hplay)
|
||||
c" mrboss.hss" (hplay)
|
||||
c" mrevil.hss" (hplay)
|
||||
c" raind.hss" (hplay)
|
||||
c" sytrus.hss" (hplay)
|
||||
c" tbellsp1.hss" (hplay) ;
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: lib:hss
|
||||
: lib:hss ;
|
||||
|
||||
\ kommandoformate
|
||||
|
||||
ifnot: adm:fkt! \ ( fkt -- )
|
||||
: adm:fkt! b[ [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b! \ ( b fkt -- )
|
||||
: adm:fkt!b! b[ [a!] [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!b! \ ( b b fkt -- )
|
||||
: adm:fkt!b!b! b[ [a!] [a!] [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!w@ \ ( b fkt -- w )
|
||||
: adm:fkt!b!w@ b[ [a!] [a!] [a.w@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!s!b@ \ ( cstr fkt -- b )
|
||||
: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ;
|
||||
|
||||
\ hss-funktionen
|
||||
|
||||
\ ( cstr -- err ) - hss-datei laden
|
||||
ifnot: hss:load
|
||||
: hss:load dup if 64 adm:fkt!s!b@ then ;
|
||||
|
||||
\ ( -- ) - datei im puffer abspielen
|
||||
ifnot: hss:play
|
||||
: hss:play 65 adm:fkt! ;
|
||||
|
||||
\ ( -- ) - player stop
|
||||
ifnot: hss:stop
|
||||
: hss:stop 66 adm:fkt! ;
|
||||
|
||||
\ ( -- ) - player pause
|
||||
ifnot: hss:pause
|
||||
: hss:pause 67 adm:fkt! ;
|
||||
|
||||
\ hreg ( regnr -- 16b )
|
||||
\ 0 iEndFlag iRowFlag iEngineC iBeatC iRepeat Player
|
||||
\ 5 iNote iOktave iVolume iEffekt iInstrument Kanal 1
|
||||
\ 10 iNote iOktave iVolume iEffekt iInstrument Kanal 2
|
||||
\ 15 iNote iOktave iVolume iEffekt iInstrument Kanal 3
|
||||
\ 20 iNote iOktave iVolume iEffekt iInstrument Kanal 4
|
||||
\
|
||||
\ iEndFlag Repeat oder Ende wurde erreicht
|
||||
\ iRowFlag Trackerzeile (Row) ist fertig
|
||||
\ iEngineC Patternzähler
|
||||
\ iBeatC Beatzähler (Anzahl der Rows)
|
||||
\ iRepeat Zähler für Loops
|
||||
ifnot: hss:reg
|
||||
: hss:reg 69 b[ [a!] [a!] [a.w@] ]b ;
|
||||
|
||||
\ hvol ( vol -- ) - lautstärke 0..15
|
||||
ifnot: hss:vol
|
||||
: hss:vol 6A adm:fkt!b! ;
|
||||
|
Binary file not shown.
|
@ -0,0 +1,17 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: lib:key
|
||||
: lib:key ;
|
||||
|
||||
\ kommandoformate
|
||||
ifnot: bel:fkt!b@ \ ( fkt -- b )
|
||||
: bel:fkt!b@ b[ 0 [b!] [b!] [b@] ]b ;
|
||||
|
||||
\ keyboard-funktionen
|
||||
ifnot: key:stat \ ( -- stat ) - tastenstatus abfragen
|
||||
: key:stat 1 bel:fkt!b@ ;
|
||||
ifnot: key:code \ ( -- code ) - tastencode abfragen
|
||||
: key:code 2 bel:fkt!b@ ;
|
||||
ifnot: key:spec \ ( -- spec ) - spezialtasten abfragen
|
||||
: key:spec 4 bel:fkt!b@ ;
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,56 @@
|
|||
help - diese hilfe
|
||||
<sd:dateiname> - bin/adm/bel-datei wird gestartet
|
||||
mount - sd-card mounten
|
||||
unmount - sd-card abmelden
|
||||
dir wh - verzeichnis anzeigen
|
||||
type <sd:fn> - anzeige einer textdatei
|
||||
aload <sd:fn> - administra-code laden
|
||||
bload <sd:fn> - bellatrix-treiber laden
|
||||
rload <sd:fn> - regnatix-code laden
|
||||
del <sd:fn> - datei l?schen
|
||||
cls - bildschirm l?schen
|
||||
free - freier speicher auf sd-card
|
||||
attrib <sd:fn> ashr - attribute ?ndern
|
||||
cd <sd:dir> - verzeichnis wechseln
|
||||
mkdir <sd:dir> - verzeichnis erstellen
|
||||
rename <sd:fn1> <sd:fn2> - datei/verzeichnis umbenennen
|
||||
format <volname> - sd-card formatieren
|
||||
reboot - hive neu starten
|
||||
sysinfo - systeminformationen
|
||||
color <0..7> - farbe w?hlen
|
||||
cogs - belegung der cogs anzeigen
|
||||
dmlist - anzeige der verzeichnis-marker
|
||||
dm <r/s/u/a/b/c> - in das entsprechende marker-
|
||||
verzeichnis wechseln
|
||||
dmset <r/s/u/a/b/c> - setzt den entsprechenden marker
|
||||
auf das aktuelle verzeichnis
|
||||
dmclr <r/s/u/a/b/c> - marker l”schen
|
||||
|
||||
marker:
|
||||
r - root-verzeichnis
|
||||
s - system-verzeichnis
|
||||
u - user-verzeichnis
|
||||
a/b/c - benutzerdefinierte verzeichnismarker
|
||||
r, s, u-marker werden vom system automatisch gesetzt und
|
||||
intern verwendet.
|
||||
|
||||
RAMDISK:
|
||||
|
||||
xload <sd:fn> - datei in ram laden
|
||||
xsave <x:fn> - datei aus ram speichern
|
||||
xdir - verzeichnis im ram anzeigen
|
||||
xrename <x:fn1> <x:fn2> - datei im ram umbenennen
|
||||
xdel <x:fn> - datei im ram l”schen
|
||||
xtype <x:fn> - text im ram anzeigen
|
||||
|
||||
EXTERNE KOMMANDOS:
|
||||
|
||||
sysconf - systemeinstellungen
|
||||
hplay - hss-player
|
||||
wplay - wav-player
|
||||
sfxtool - hss-soundeffekte erstellen
|
||||
|
||||
vga.bin - vga 1024 x 768 pixel, 64 x 24 zeichen
|
||||
htext.bin - vga 1024 x 768 pixel, 128 x 48 zeichen
|
||||
tv.bin - tv-textmodus 40 x 13 zeichen
|
||||
|
Binary file not shown.
|
@ -0,0 +1,206 @@
|
|||
|
||||
\ ACHTUNG: Diese Modifikation nicht bei einer Installation im
|
||||
\ HI-EEPROM verwenden!
|
||||
|
||||
hex
|
||||
[if mod:rom
|
||||
: mod:rom ; ]
|
||||
|
||||
\ constant ( x -- ) skip blanks parse the next word and create a constant, allocate a long, 4 bytes
|
||||
[if constant
|
||||
: constant lockdict create $C_a_doconl w, l, forthentry freedict ; ]
|
||||
|
||||
\
|
||||
\ CONFIG PARAMETERS BEGIN
|
||||
\
|
||||
40 wconstant fsps \ a page size which works with 32kx8 & 64kx8 eeproms
|
||||
\ and should work with larger as well.
|
||||
|
||||
|
||||
8000 constant fsbot \ file-system bottom: the start adress in eeprom for the file system
|
||||
|
||||
\ file system top: the end address of the file system
|
||||
\ uncomment the line for your comfiguration
|
||||
\ 8000 constant fstop \ the end address for the file system with one 24LC256 32k eeprom
|
||||
10000 constant fstop \ the end address for the file system with one 24LC512 64k eeprom
|
||||
\ 20000 constant fstop \ the end address for the file system with two 24LC512 64k eeprom
|
||||
\ 30000 constant fstop \ the end address for the file system with 3 24LC512 64k eeprom
|
||||
\ 40000 constant fstop \ the end address for the file system with 4 24LC512 64k eeprom
|
||||
\ 50000 constant fstop \ the end address for the file system with 5 24LC512 64k eeprom
|
||||
\ 60000 constant fstop \ the end address for the file system with 6 24LC512 64k eeprom
|
||||
\ 70000 constant fstop \ the end address for the file system with 7 24LC512 64k eeprom
|
||||
|
||||
\ NOTE IF you have DEMOBOARD or any system with 32K EEPROM, you will step on your spin image
|
||||
\ when you write to the EEPROM. You can still use it (if you are tricky), but KNOW WHAT YOUR DOING!!!
|
||||
|
||||
\
|
||||
\ CONFIG PARAMETERS END
|
||||
\
|
||||
|
||||
|
||||
\ lasti? ( -- t/f ) true if this is the last value of i in this loop
|
||||
[if lasti?
|
||||
: lasti? _rsptr COG@ 2+ COG@ 1- _rsptr COG@ 3 + COG@ = ; ]
|
||||
|
||||
\ padbl ( -- ) fills this cogs pad with blanks
|
||||
[if padbl
|
||||
: padbl pad padsize bl fill ; ]
|
||||
\ _eeread ( t/f -- c1 ) read a byte from the eeprom, ackbit in, byte out
|
||||
[if _eeread : _eeread _sdai 0 8 0 do 1 lshift _sclh _sda? _scll if 1 or then loop
|
||||
swap if _sdah else _sdal then _sdao _sclh _scll _sdal ; ]
|
||||
|
||||
\ the eereadpage and eewritePage words assume the eeprom are 64kx8 and will address up to
|
||||
\ 8 sequential eeproms
|
||||
\ eereadpage ( eeAddr addr u -- t/f ) return true if there was an error, use lock 1
|
||||
[if eereadpage : eereadpage begin 1 lockset 0= until
|
||||
1 max rot dup ff and swap dup 8 rshift ff and swap 10 rshift 7 and 1 lshift dup >r
|
||||
_eestart A0 or _eewrite swap _eewrite or swap _eewrite or
|
||||
_eestart r> A1 or _eewrite or
|
||||
rot2 bounds
|
||||
do lasti? _eeread i C! loop _eestop 1 lockclr drop ; ]
|
||||
|
||||
\ _eeread ( t/f -- c1 ) read a byte from the eeprom, ackbit in, byte out
|
||||
[if _eeread : _eeread _sdai 0 8 0 do 1 lshift _sclh _sda? _scll if 1 or then loop
|
||||
swap if _sdah else _sdal then _sdao _sclh _scll _sdal ; ]
|
||||
|
||||
\ the eereadpage and eewritePage words assume the eeprom are 64kx8 and will address up to
|
||||
\ 8 sequential eeproms
|
||||
\ eereadpage ( eeAddr addr u -- t/f ) return true if there was an error, use lock 1
|
||||
[if eereadpage : eereadpage begin 1 lockset 0= until
|
||||
1 max rot dup ff and swap dup 8 rshift ff and swap 10 rshift 7 and 1 lshift dup >r
|
||||
_eestart A0 or _eewrite swap _eewrite or swap _eewrite or
|
||||
_eestart r> A1 or _eewrite or
|
||||
rot2 bounds
|
||||
do lasti? _eeread i C! loop _eestop 1 lockclr drop ; ]
|
||||
|
||||
\ EW@ ( eeAddr -- n1 )
|
||||
[if EW@
|
||||
: EW@ t0 2 eereadpage if 8006 ERR then t0 W@ ; ]
|
||||
|
||||
\ EC@ ( eeAddr -- c1 )
|
||||
[if EC@
|
||||
: EC@ EW@ FF and ; ]
|
||||
|
||||
\ (fspa) ( addr1 -- addr2) addr2 is the next page aligned address after addr1
|
||||
: (fspa) fsps 1- + fsps 1- andn ;
|
||||
|
||||
\ (fsnext) ( addr1 -- addr2 t/f) addr - the current file address, addr2 - the next addr, t/f - true if we have
|
||||
\ gone past the end of the eeprom. t0 -length of the current file
|
||||
\ t1 - length of the file name (char)
|
||||
: (fsnext) t0 W@ t1 C@ + 2+ 1+ + (fspa) dup fstop >= ;
|
||||
|
||||
|
||||
\ (fswr) ( addr1 addr2 n1 -- ) addr1 - the eepropm address to write, addr2 - the address to write from
|
||||
\ n1 - the number of bytes to write
|
||||
: (fswr) dup >r rot dup r> + fstop 1- > if A0 ERR then rot2 eewritepage if 88 ERR then ;
|
||||
|
||||
\ (fsrd) ( addr1 addr2 n1 -- ) addr1 - the eepropm address to read, addr2 - the address of the read buffer
|
||||
\ n1 - the number of bytes to read
|
||||
: (fsrd) dup >r rot dup r> + fstop 1- > if C0 ERR then rot2 eereadpage if 90 ERR then ;
|
||||
|
||||
\ (fsfree) ( -- n1 ) n1 is the first location in the file system, -1 if there are none
|
||||
: (fsfree) -1 fsbot begin
|
||||
\ read 3 bytes into t0, t1 and process
|
||||
dup t0 3 (fsrd) t0 W@ FFFF = if nip dup -1 else (fsnext) then
|
||||
until drop ;
|
||||
|
||||
\ (fsfind) ( cstr -- addr ) find the last file named cstr, addr is the eeprom address, 0 if not found
|
||||
: (fsfind) fsbot 0 >r begin
|
||||
\ read namesizemax 1F + 3 bytes into t0, t1, and tbuf
|
||||
dup t0 22 (fsrd) t0 W@ FFFF = if -1 else
|
||||
over t1 cstr= if r> drop dup >r then
|
||||
(fsnext)
|
||||
then
|
||||
until 2drop r> ;
|
||||
|
||||
\ (fslast) ( -- addr ) find the last file, 0 if not found
|
||||
: (fslast) 0 fsbot begin
|
||||
\ read namesizemax 1F + 3 bytes into t0, t1, and tbuf
|
||||
dup t0 22 (fsrd) t0 W@ FFFF = if -1 else
|
||||
nip dup
|
||||
(fsnext)
|
||||
then
|
||||
until drop ;
|
||||
|
||||
\ fsclear ( -- )
|
||||
: fsclr padbl fsbot 400 + fsbot do i pad fsps (fswr) 2e emit fsps +loop -1 fsbot EW! ;
|
||||
: fsclear -1 fsbot EW! ;
|
||||
|
||||
\ fsfree ( -- )
|
||||
: fsfree (fsfree) dup -1 = if 0 else fstop swap - then . ." bytes free in fs" cr ;
|
||||
|
||||
\ fsls ( -- ) list the files
|
||||
: fsls cr fsbot begin
|
||||
\ read namesizemax 1F + 3 bytes into t0, t1, and tbuf
|
||||
dup t0 22 (fsrd) t0 W@ FFFF = if -1 else
|
||||
dup .addr space t0 W@ .addr space t1 .cstr cr
|
||||
(fsnext)
|
||||
then
|
||||
until fstop swap - cr . ." bytes free in files system" cr cr ;
|
||||
|
||||
\ (fsread) ( cstr -- )
|
||||
: (fsread) (fsfind) dup if
|
||||
\ read 3 bytes into t0, t1 and process
|
||||
dup t0 3 (fsrd)
|
||||
t1 C@ + 2+ 1+ t0 W@ bounds do
|
||||
ibound i - fsps >= if
|
||||
i pad fsps (fsrd) pad fsps bounds
|
||||
do i C@ emit loop i fsps 1- + seti
|
||||
else
|
||||
i EC@ emit
|
||||
then
|
||||
loop
|
||||
else drop then padbl ;
|
||||
|
||||
\ fsread ( -- ) filename
|
||||
: fsread parsenw dup if (fsread) else drop then ;
|
||||
|
||||
\ (fsload) ( ctsr -- )
|
||||
: (fsload) cogid nfcog iolink (fsread) d emit d emit cogid iounlink ;
|
||||
|
||||
\ fsload filename ( -- ) send the file to the next free forth cog
|
||||
: fsload parsenw dup if (fsload) else drop then ;
|
||||
|
||||
\ (fsk) ( n1 -- n2)
|
||||
: (fsk) 8 lshift key or ;
|
||||
|
||||
\ fswrite filename ( -- ) writes a file until ... followed immediately by a cr is encountered
|
||||
: fswrite (fsfree) dup -1 <> parsenw dup rot and if
|
||||
\ set the file length to 0, copy in the file name
|
||||
0 pad W! dup C@ 2+ 1+ pad + swap pad 2+ ccopy
|
||||
\ find the first free page
|
||||
0 swap key (fsk) (fsk) (fsk)
|
||||
\ ( eaddr1 n1 addr2 n2 ) eaddr - start of file in the eeprom, n1 - bytes written so far, addr2 - next addr in the pad,
|
||||
\ n2 - a 4 byte key buffer
|
||||
begin
|
||||
\ check to see if we have a ... at the end of a line
|
||||
2E2E2E0D over = if
|
||||
-1
|
||||
else
|
||||
\ get a key from the key buffer, write it the the pad
|
||||
swap over 18 rshift dup dup d = if drop cr else emit then over C! 1+ tuck pad - fsps = if
|
||||
\ we have a page worth of data, write it out
|
||||
nip rot2 2dup + pad fsps (fswr) fsps + rot pad swap
|
||||
then
|
||||
\ get another key
|
||||
(fsk) 0
|
||||
then
|
||||
until
|
||||
\ any keys left?
|
||||
drop pad - dup 0> if
|
||||
\ write the leftover, not a full page
|
||||
>r 2dup + pad r> dup >r (fswr) r> +
|
||||
else
|
||||
drop
|
||||
then
|
||||
\ write the length of FFFF for the next file
|
||||
2dup + FFFF swap (fspa) dup fstop 1- < if EW! else 2drop then
|
||||
\ subtract the length of the filename +1, and the 2 bytes which are the length of the file, and update the length of the file
|
||||
over 2+ EC@ 2+ 1+ - swap EW!
|
||||
else 2drop clearkeys then padbl
|
||||
;
|
||||
|
||||
\ fsdrop ( -- ) deletes last file
|
||||
: fsdrop (fslast) dup -1 = if drop else FFFF swap EW! then ;
|
||||
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: lib:scr
|
||||
: lib:scr ;
|
||||
|
||||
\ kommandoformate
|
||||
ifnot: bel:char \ ( b -- )
|
||||
: bel:char b[ [b!] ]b ;
|
||||
ifnot: bel:fkt!b! \ ( b fkt -- )
|
||||
: bel:fkt!b! b[ 0 [b!] [b!] [b!] ]b ;
|
||||
ifnot: bel:fkt!b!b! \ ( b b fkt -- )
|
||||
: bel:fkt!b!b! b[ 0 [b!] [b!] [b!] [b!] ]b ;
|
||||
ifnot: bel:ctrl! \ ( ctrl -- )
|
||||
: bel:ctrl! b[ 0 [b!] 3 [b!] [b!] ]b ;
|
||||
ifnot: bel:ctrl!b! \ ( b ctrl -- )
|
||||
: bel:ctrl!b! b[ 0 [b!] 3 [b!] [b!] [b!] ]b ;
|
||||
ifnot: bel:ctrl!b@ \ ( ctrl -- b@ )
|
||||
: bel:ctrl!b@ b[ 0 [b!] 3 [b!] [b!] [b@] ]b ;
|
||||
ifnot: bel:ctrl!b!b! \ ( b b ctrl -- )
|
||||
: bel:ctrl!b!b! b[ 0 [b!] 3 [b!] [b!] [b!] [b!] [b!] ]b ;
|
||||
|
||||
\ einfache steuerzeichen
|
||||
ifnot: scr:cls \ ( -- ) - screen löschen
|
||||
: scr:cls 01 bel:char ;
|
||||
ifnot: scr:home \ ( -- ) - cursor oben links
|
||||
: scr:home 02 bel:char ;
|
||||
ifnot: scr:pos1 \ ( -- ) - cursor an zeilenanfang
|
||||
: scr:pos1 03 bel:char ;
|
||||
ifnot: scr:curon \ ( -- ) - cursor anschalten
|
||||
: scr:curon 04 bel:char ;
|
||||
ifnot: scr:curoff \ ( -- ) - cursor abschalten
|
||||
: scr:curoff 05 bel:char ;
|
||||
ifnot: scr:scrlu \ ( -- ) - screen nach oben scrollen
|
||||
: scr:scrlu 06 bel:char ;
|
||||
ifnot: scr:scrld \ ( -- ) - screen nach unten scrollen
|
||||
: scr:scrld 07 bel:char ;
|
||||
ifnot: scr:bs \ ( -- ) - backspace
|
||||
: scr:bs 08 bel:char ;
|
||||
ifnot: scr:tab \ ( -- ) - tabulator
|
||||
: scr:tab 09 bel:char ;
|
||||
|
||||
\ screen-funktionen
|
||||
ifnot: scr:logo \ ( y x -- ) - hive logo
|
||||
: scr:logo 5 bel:fkt!b!b! ;
|
||||
ifnot: scr:char \ ( char -- ) - zeichensatz direkt ausgeben
|
||||
: scr:char 6 bel:fkt!b! ;
|
||||
|
||||
\ parametrisierte steuerzeichen
|
||||
ifnot: scr:setcur \ ( cur -- ) - cursorzeichen setzen
|
||||
: scr:setcur 01 bel:ctrl!b! ;
|
||||
ifnot: scr:setx \ ( x -- ) - cursor position x setzen
|
||||
: scr:setx 02 bel:ctrl!b! ;
|
||||
ifnot: scr:sety \ ( y -- ) - cursor position y setzen
|
||||
: scr:sety 03 bel:ctrl!b! ;
|
||||
ifnot: scr:getx \ ( -- x ) - cursor position x abfragen
|
||||
: scr:getx 04 bel:ctrl!b@ ;
|
||||
ifnot: scr:gety \ ( -- y ) - cursor position y abfragen
|
||||
: scr:gety 05 bel:ctrl!b@ ;
|
||||
ifnot: scr:setcol \ ( colnr -- ) - farbe wählen 0..15
|
||||
: scr:setcol 06 bel:ctrl!b! ;
|
||||
ifnot: scr:sline \ ( row -- ) - anfangszeile scrollbereich
|
||||
: scr:sline 07 bel:ctrl!b! ;
|
||||
ifnot: scr:eline \ ( row -- ) - endzeile scrollbereich
|
||||
: scr:eline 08 bel:ctrl!b! ;
|
||||
ifnot: scr:sinit \ ( -- ) -
|
||||
: scr:sinit 09 bel:ctrl! ;
|
||||
ifnot: scr:tabset \ ( pos nr -- ) - tabulatorposition setzen 0..7
|
||||
: scr:tabset 0A bel:ctrl!b!b! ;
|
|
@ -0,0 +1,176 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: lib:sd0
|
||||
: lib:sd0 ;
|
||||
|
||||
\ ------------------------------------ lib:sd0
|
||||
|
||||
\ kommandoformate
|
||||
|
||||
ifnot: adm:fkt!b! \ ( b fkt -- )
|
||||
: adm:fkt!b! b[ [a!] [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!b@ \ ( b fkt -- b )
|
||||
: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!l@ \ ( b fkt -- l )
|
||||
: adm:fkt!b!l@ b[ [a!] [a!] [a.l@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!l! \ ( l fkt -- )
|
||||
: adm:fkt!l! b[ [a!] [a.l!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!l@ \ ( fkt -- l )
|
||||
: adm:fkt!l@ b[ [a!] [a.l@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!l! \ ( l b fkt -- )
|
||||
: adm:fkt!b!l! b[ [a!] [a!] [a.l!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!s!b@ \ ( s fkt -- b )
|
||||
: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!s!b@ \ ( s b fkt -- b )
|
||||
: adm:fkt!b!s!b@ b[ [a!] [a!] [a.s!] [a@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!s!s!b@ \ ( s s fkt -- b )
|
||||
: adm:fkt!s!s!b@ b[ [a!] [a.s!] [a.s!] [a@] ]b ;
|
||||
|
||||
\ dateisystem-funktionen
|
||||
|
||||
\ adm:mount ( -- err ) - medium mounten
|
||||
ifnot: adm:mount
|
||||
: adm:mount
|
||||
01 adm:fkt!b@ ;
|
||||
|
||||
\ adm:diropen ( -- ) - verzeichnisabfrage initialisieren
|
||||
ifnot: adm:diropen
|
||||
: adm:diropen
|
||||
02 adm:fkt! ;
|
||||
|
||||
\ adm:nextfile ( -- st )
|
||||
\ st = 0 - keine gültige datei
|
||||
\ st = 1 - dateiname im pad gültig
|
||||
\ bei gültigem eintrag befindet sich der dateiname im pad
|
||||
ifnot: adm:nextfile
|
||||
: adm:nextfile
|
||||
b[ 03 [a!] [a@] dup if [a.s@] then ]b ;
|
||||
|
||||
\ adm:open ( cstr modus -- err ) - datei öffnen
|
||||
\ modus "R" $52 - Read
|
||||
\ modus "W" $57 - Write
|
||||
\ modus "A" $41 - Append
|
||||
ifnot: adm:open
|
||||
: adm:open
|
||||
04 adm:fkt!b!s!b@ ;
|
||||
|
||||
\ adm:close ( -- ) - datei schließen
|
||||
ifnot: adm:close
|
||||
: adm:close
|
||||
05 adm:fkt!b@ ;
|
||||
|
||||
\ adm:getc ( -- c ) - ein zeichen aus datei lesen
|
||||
ifnot: adm:getc
|
||||
: adm:getc
|
||||
06 adm:fkt!b@ ;
|
||||
|
||||
\ adm:putc ( c -- ) - ein zeichen in datei schreiben
|
||||
ifnot: adm:putc
|
||||
: adm:putc
|
||||
07 adm:fkt!b! ;
|
||||
|
||||
\ adm:eof ( -- eof ) - abfrage ob end of file erreicht ist
|
||||
ifnot: adm:eof
|
||||
: adm:eof
|
||||
1E adm:fkt!b@ ;
|
||||
|
||||
\ adm:getblk ( adr cnt -- ) - datenblock aus datei lesen
|
||||
|
||||
\ adm:putblk ( adr cnt -- ) - datenblock in datei schreiben
|
||||
|
||||
\ adm:seek ( pos -- ) - position in datei setzen
|
||||
: adm:seek
|
||||
0A adm:fkt!l! ;
|
||||
|
||||
\ adm:fattrib ( nr -- attrib ) - dateiattribut abfragen
|
||||
ifnot: adm:fattrib
|
||||
: adm:fattrib
|
||||
0B adm:fkt!b!l@ ;
|
||||
|
||||
\ adm:volname ( -- ) - name des volumes im pad ablegen
|
||||
ifnot: adm:volname
|
||||
: adm:volname
|
||||
0C adm:fkt!s@ ;
|
||||
|
||||
\ adm:checkmounted ( -- t/f )
|
||||
ifnot: adm:checkmounted
|
||||
: adm:checkmounted
|
||||
0D adm:fkt!b@ ;
|
||||
|
||||
\ adm:checkopen ( -- t/f )
|
||||
ifnot: adm:checkopen
|
||||
: adm:checkopen
|
||||
0E adm:fkt!b@ ;
|
||||
|
||||
\ adm:checkused ( -- used ) - anzahl benutzte sektoren
|
||||
ifnot: adm:checkused
|
||||
: adm:checkused
|
||||
0F adm:fkt!l@ ;
|
||||
|
||||
\ adm:checkfree ( -- free ) - anzahl freie sektoren
|
||||
ifnot: adm:checkfree
|
||||
: adm:checkfree
|
||||
10 adm:fkt!l@ ;
|
||||
|
||||
\ adm:newfile ( cstr -- ) - neue datei erstellen
|
||||
ifnot: adm:newfile
|
||||
: adm:newfile
|
||||
11 adm:fkt!s!b@ ;
|
||||
|
||||
\ adm:newdir ( cstr -- ) - neues verzeichnis erstellen
|
||||
ifnot: adm:newdir
|
||||
: adm:newdir
|
||||
12 adm:fkt!s!b@ ;
|
||||
|
||||
\ adm:del ( cstr -- ) - datei/verzeichnis löschen
|
||||
ifnot: adm:del
|
||||
: adm:del
|
||||
13 adm:fkt!s!b@ ;
|
||||
|
||||
\ adm:rename ( cstr1.fn1 cstr2.fn2 -- )
|
||||
ifnot: adm:rename
|
||||
: adm:rename
|
||||
14 adm:fkt!s!s!b@ ;
|
||||
|
||||
\ adm:chattrib ( cstr1.fn cstr2.attrib -- )
|
||||
ifnot: adm:chattrib
|
||||
: adm:chattrib
|
||||
15 adm:fkt!s!s!b@ ;
|
||||
|
||||
\ adm:chdir ( cstr -- err ) - verzeichnis öffnen
|
||||
ifnot: adm:chdir
|
||||
: adm:chdir
|
||||
16 adm:fkt!s!b@ ;
|
||||
|
||||
\ adm:format ( cstr.label -- ) - medium formatieren
|
||||
ifnot: adm:format
|
||||
: adm:format
|
||||
17 adm:fkt!s!b@ ;
|
||||
|
||||
\ adm:unmount ( -- err ) - medium unmounten
|
||||
ifnot: adm:unmount
|
||||
: adm:unmount
|
||||
18 adm:fkt!b@ ;
|
||||
|
||||
\ marker-funktionen
|
||||
|
||||
ifnot: adm:dmact \ ( dmnr -- ) - marker aktivieren
|
||||
: adm:dmact 19 adm:fkt!b!b@ .err ;
|
||||
ifnot: adm:dmset \ ( dmnr -- ) - marker setzen
|
||||
: adm:dmset 1A adm:fkt!b! ;
|
||||
ifnot: adm:dmget \ ( dmnr -- dm ) - marker lesen
|
||||
: adm:dmget 1B adm:fkt!b!l@ ;
|
||||
ifnot: adm:dmclr \ ( dmnr -- ) - marker löschen
|
||||
: adm:dmclr 1C adm:fkt!b! ;
|
||||
ifnot: adm:dmput \ ( dm dmnr -- ) - marker schreiben
|
||||
: adm:dmput 1D adm:fkt!b!l! ;
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: lib:sfx
|
||||
: lib:sfx ;
|
||||
|
||||
\ kommandoformen
|
||||
|
||||
ifnot: adm:fkt!b! \ ( b fkt -- )
|
||||
: adm:fkt!b! b[ [a!] [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!b! \ ( b b fkt -- )
|
||||
: adm:fkt!b!b! b[ [a!] [a!] [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!64b! \ ( ptr b fkt -- )
|
||||
: adm:fkt!b!64b! b[ [a!] [a!]
|
||||
31 0 do dup i + C@ [a!] loop drop ]b ;
|
||||
|
||||
\ sfx-funktionen
|
||||
|
||||
\ sfx:fire( chan slot -- ) - sfx abspielen
|
||||
\ slot - $00..$0f nummer der freien effektpuffer
|
||||
\ slot - $f0..f5 vordefinierte effektslots
|
||||
\ chan - 0/1 stereokanal
|
||||
\ vordefinierte effekte
|
||||
\ &f0 - warnton
|
||||
\ $f1 - signalton
|
||||
\ $f2 - herzschlag schnell
|
||||
\ $f3 - herzschlag langsam
|
||||
\ $f4 - telefon
|
||||
\ $f5 - phaser :)
|
||||
\ $f6 - pling
|
||||
\ $f7 - on
|
||||
\ $f8 - off
|
||||
ifnot: sfx:fire
|
||||
: sfx:fire 6B adm:fkt!b!b! ;
|
||||
|
||||
\ ( ptr slot -- ) - sfx setzen
|
||||
\ slot - $00..$0f nummer der freien effektpuffer
|
||||
\ ptr - zeiger auf 32 byte effektdaten
|
||||
\
|
||||
\ struktur der effektdaten:
|
||||
\
|
||||
\ [wav ][len ][freq][vol ] grundschwingung
|
||||
\ [lfo ][lfw ][fma ][ama ] modulation
|
||||
\ [att ][dec ][sus ][rel ] hüllkurve
|
||||
\ [seq ] (optional)
|
||||
\
|
||||
\ [wav] wellenform
|
||||
\ 0 sinus (0..500hz)
|
||||
\ 1 schneller sinus (0..1khz)
|
||||
\ 2 dreieck (0..500hz)
|
||||
\ 3 rechteck (0..1khz)
|
||||
\ 4 schnelles rechteck (0..4khz)
|
||||
\ 5 impulse (0..1,333hz)
|
||||
\ 6 rauschen
|
||||
\ [len] tonlänge $0..$fe, $ff endlos
|
||||
\ [freq] frequenz $00..$ff
|
||||
\ [vol] lautstärke $00..$0f
|
||||
\
|
||||
\ [lfo] low frequency oscillator $ff..$01
|
||||
\ [lfw] low frequency waveform
|
||||
\ $00 sinus (0..8hz)
|
||||
\ $01 fast sine (0..16hz)
|
||||
\ $02 ramp up (0..8hz)
|
||||
\ $03 ramp down (0..8hz)
|
||||
\ $04 square (0..32hz)
|
||||
\ $05 random
|
||||
\ $ff sequencer data (es folgt eine sequenzfolge [seq])
|
||||
\ [fma] frequency modulation amount
|
||||
\ $00 no modulation
|
||||
\ $01..$ff
|
||||
\ [ama] amplitude modulation amount
|
||||
\ $00 no modulation
|
||||
\ $01..$ff
|
||||
\ [att] attack $00..$ff
|
||||
\ [dec] decay $00..$ff
|
||||
\ [sus] sustain $00..$ff
|
||||
\ [rel] release $00..$ff
|
||||
ifnot: sfx:setslot
|
||||
: sfx:setslot
|
||||
6C adm:fkt!b!64b! ;
|
||||
|
||||
\ sfx:keyoff ( chan -- ) - release-phase einleiten
|
||||
ifnot: sfx:keyoff
|
||||
: sfx:keyoff
|
||||
6D adm:fkt!b! ;
|
||||
|
||||
\ sfx:stop ( chan -- )
|
||||
ifnot: sfx:stop
|
||||
: sfx:stop
|
||||
6E adm:fkt!b! ;
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,116 @@
|
|||
|
||||
\ achtung: vor verwendung muss der administra-code mit sidcog
|
||||
\ geladen werden:
|
||||
\ sys tools.f
|
||||
\ sys splay.f <--- sid-player laden
|
||||
\ aload admsid.adm <--- administra-code mit sidcog laden
|
||||
\ splay xyz.dmp <--- sid-datei abspielen
|
||||
|
||||
|
||||
hex
|
||||
|
||||
ifnot: mod:splay
|
||||
: mod:splay ;
|
||||
|
||||
\ kommandoformen
|
||||
|
||||
ifnot: adm:fkt! \ ( fkt -- )
|
||||
: adm:fkt! b[ [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b! \ ( b fkt -- )
|
||||
: adm:fkt!b! b[ [a!] [a!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b@ \ ( fkt -- b )
|
||||
: adm:fkt!b@ b[ 0 [a!] [a!] [a@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!s! \ ( s fkt -- )
|
||||
: adm:fkt!s! b[ [a!] [a.s!] ]b ;
|
||||
|
||||
ifnot: adm:fkt!s!b@ \ ( s fkt -- err )
|
||||
: adm:fkt!s! b[ [a!] [a.s!] [b@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!l@ \ ( b fkt -- l )
|
||||
: adm:fkt!b!l@ b[ [a!] [a!] [a.l@] ]b ;
|
||||
|
||||
\ dm-funktionen
|
||||
ifnot: adm:dmget \ ( dmnr -- dm ) - marker lesen
|
||||
: adm:dmget 1B adm:fkt!b!l@ ;
|
||||
|
||||
\ adm:dmact ( dmnr -- ) - marker aktivieren
|
||||
: adm:dmact 19 adm:fkt!b!b@ drop ;
|
||||
|
||||
\ adm-funktionen
|
||||
|
||||
\ adm:aload ( cstr -- ) - neuen administra-code laden
|
||||
ifnot: adm:aload
|
||||
: adm:aload
|
||||
60 adm:fkt!s! ;
|
||||
|
||||
\ tools
|
||||
|
||||
ifnot: aload
|
||||
: aload
|
||||
mount? parsenw dup
|
||||
if 1 adm:dmact adm:aload 0 else drop 23 then .err ;
|
||||
|
||||
\ sid-funktionen
|
||||
|
||||
ifnot: sid:play
|
||||
: sid:play \ ( cstr -- err )
|
||||
9E adm:fkt!s!b@ ;
|
||||
|
||||
ifnot: sid:stop
|
||||
: sid:stop \ ( -- )
|
||||
9F adm:fkt! ;
|
||||
|
||||
ifnot: sid:status
|
||||
: sid:status \ ( -- status )
|
||||
A1 adm:fkt!b@ ;
|
||||
|
||||
ifnot: sid:mute
|
||||
\ 1 - sid1
|
||||
\ 2 - sid2
|
||||
\ 3 - sid1 & sid2
|
||||
: sid:mute \ ( sidnr -- )
|
||||
A3 adm:fkt!b! ;
|
||||
|
||||
\ send? ( -- t/f )
|
||||
ifnot: send?
|
||||
: send?
|
||||
begin 50 delms key? dup if key drop then sid:status 0= or
|
||||
until ;
|
||||
|
||||
\ (splay) ( cstr -- )
|
||||
ifnot: (splay)
|
||||
: (splay) \ ( cstr -- )
|
||||
." Datei : " dup .cstr cr sid:play .err
|
||||
send? sid:stop 3 sid:mute adm:close drop ;
|
||||
|
||||
\ files? ( -- cnt ) - anzahl dateien im dir
|
||||
ifnot: files?
|
||||
: files?
|
||||
adm:diropen
|
||||
0 begin adm:nextfile swap 1+ swap 0= until 3 - padbl ;
|
||||
|
||||
\ filenr? ( nr -- )
|
||||
ifnot: filenr?
|
||||
: filenr?
|
||||
adm:diropen
|
||||
0 do adm:nextfile drop loop ;
|
||||
|
||||
\ splay name.dmp ( -- ) - sid-datei abspielen
|
||||
ifnot: splay
|
||||
: splay
|
||||
parsenw (splay) ;
|
||||
|
||||
\ sdirplay ( -- ) - gesamtes verzeichnis abspielen
|
||||
\ im verzeichnis dürfen nur sid-dateien sein!
|
||||
ifnot: sdirplay
|
||||
: sdirplay
|
||||
files? dup ." Dateien : " . cr
|
||||
0 do i dup 1 + . 3 + filenr? pad (splay) loop padbl ;
|
||||
|
||||
ifnot: smute
|
||||
: smute
|
||||
sid:stop 3 sid:mute ;
|
||||
|
Binary file not shown.
|
@ -0,0 +1,7 @@
|
|||
|
||||
"Die Blütenträume
|
||||
Von Faltern, wie ich hörte,
|
||||
So lautlos wie sie -"
|
||||
Reikan
|
||||
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
Johann Wolfgang Goethe
|
||||
|
||||
Der Zauberlehrling
|
||||
|
||||
Hat der alte Hexenmeister
|
||||
Sich doch einmal wegbegeben!
|
||||
Und nun sollen seine Geister
|
||||
Auch nach meinem Willen leben!
|
||||
Seine Wort' und Werke
|
||||
Merkt' ich und den Brauch,
|
||||
Und mit Geistesstärke
|
||||
Tu' ich Wunder auch.
|
||||
|
||||
Walle! Walle
|
||||
Manche Strecke,
|
||||
Dass, zum Zwecke,
|
||||
Wasser fließe
|
||||
Und mit reichem, vollem Schwalle
|
||||
Zu dem Bade sich ergieße.
|
||||
|
||||
Und nun komm, du alter Besen!
|
||||
Nimm die schlechten Lumpenhüllen!
|
||||
Bist schon lange Knecht gewesen;
|
||||
Nun erfülle meinen Willen!
|
||||
Auf zwei Beinen stehe,
|
||||
Oben sei ein Kopf,
|
||||
Eile nun und gehe
|
||||
Mit dem Wassertopf!
|
||||
|
||||
Walle! Walle
|
||||
Manche Strecke,
|
||||
Dass, zum Zwecke,
|
||||
Wasser fließe
|
||||
Und mit reichem, vollem Schwalle
|
||||
Zu dem Bade sich ergieße.
|
||||
|
||||
Seht, er läuft zum Ufer nieder;
|
||||
Wahrlich! ist schon an dem Flusse,
|
||||
Und mit Blitzesschnelle wieder
|
||||
Ist er hier mit raschem Gusse.
|
||||
Schon zum zweiten Male!
|
||||
Wie das Becken schwillt!
|
||||
Wie sich jede Schale
|
||||
Voll mit Wasser füllt!
|
||||
|
||||
Stehe! Stehe!
|
||||
Denn wir haben
|
||||
Deiner Gaben
|
||||
Voll gemessen!
|
||||
Ach, ich merk' es! Wehe! Wehe!
|
||||
Hab' ich doch das Wort vergessen!
|
||||
|
||||
Ach, das Wort, worauf am Ende
|
||||
Er das wird, was er gewesen.
|
||||
Ach, er läuft und bringt behände!
|
||||
Wärst du doch der alte Besen!
|
||||
Immer neue Güsse
|
||||
Bringt er schnell herein,
|
||||
Ach! und hundert Flüsse
|
||||
Stürzen auf mich ein.
|
||||
|
||||
Nein, nicht länger
|
||||
Kann ich's lassen;
|
||||
Will ihn fassen.
|
||||
Das ist Tücke!
|
||||
Ach! nun wird mir immer bänger!
|
||||
Welche Miene! Welche Blicke!
|
||||
|
||||
Oh, du Ausgeburt der Hölle!
|
||||
Soll das ganze Haus ersaufen?
|
||||
Seh' ich über jede Schwelle
|
||||
Doch schon Wasserströme laufen.
|
||||
Ein verruchter Besen,
|
||||
Der nicht hören will!
|
||||
Stock, der du gewesen,
|
||||
Steh doch wieder still!
|
||||
|
||||
Willst's am Ende
|
||||
Gar nicht lassen?
|
||||
Will dich fassen,
|
||||
Will dich halten
|
||||
Und das alte Holz behände
|
||||
Mit dem scharfen Beile spalten.
|
||||
|
||||
Seht, da kommt er schleppend wieder!
|
||||
Wie ich mich nun auf dich werfe,
|
||||
Gleich, o Kobold, liegst du nieder;
|
||||
Krachend trifft die glatte Schärfe!
|
||||
Wahrlich, brav getroffen!
|
||||
Seht, er ist entzwei!
|
||||
Und nun kann ich hoffen
|
||||
Und ich atme frei!
|
||||
|
||||
Wehe! Wehe!
|
||||
Beide Teile
|
||||
Stehn in Eile
|
||||
Schon als Knechte
|
||||
Völlig fertig in die Höhe!
|
||||
Helft mir, ach! ihr hohen Mächte!
|
||||
|
||||
Und sie laufen! Nass und nässer
|
||||
Wird's im Saal und auf den Stufen.
|
||||
Welch entsetzliches Gewässer!
|
||||
Herr und Meister! Hör' mich rufen! -
|
||||
Ach, da kommt der Meister!
|
||||
Herr, die Not ist groß!
|
||||
Die ich rief, die Geister,
|
||||
Werd' ich nun nicht los.
|
||||
|
||||
In die Ecke,
|
||||
Besen! Besen!
|
||||
Seid's gewesen!
|
||||
Denn als Geister
|
||||
Ruft euch nur, zu seinem Zwecke,
|
||||
Erst hervor der alte Meister."
|
Binary file not shown.
|
@ -0,0 +1,152 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: mod:tools
|
||||
: mod:tools ;
|
||||
|
||||
\ kommandoformen
|
||||
ifnot: adm:fkt!b!l@ \ ( b fkt -- l )
|
||||
: adm:fkt!b!l@ b[ [a!] [a!] [a.l@] ]b ;
|
||||
ifnot: adm:fkt!b!b@ \ ( b fkt -- b )
|
||||
: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ;
|
||||
ifnot: adm:fkt!s! \ ( s fkt -- )
|
||||
: adm:fkt!s! b[ [a!] [a.s!] ]b ;
|
||||
|
||||
\ dm-funktionen
|
||||
ifnot: adm:dmget \ ( dmnr -- dm ) - marker lesen
|
||||
: adm:dmget 1B adm:fkt!b!l@ ;
|
||||
|
||||
ifnot: adm:dmact \ adm:dmact ( dmnr -- ) - marker aktivieren
|
||||
: adm:dmact 19 adm:fkt!b!b@ drop ;
|
||||
|
||||
\ adm-funktionen
|
||||
|
||||
\ adm:aload ( cstr -- ) - neuen administra-code laden
|
||||
ifnot: adm:load
|
||||
: adm:load
|
||||
60 adm:fkt!s! ;
|
||||
|
||||
\ bel-funktionen
|
||||
|
||||
\ bel:load ( cstr -- ) - bellatrix-code laden
|
||||
\ achtung: die gesamte loader-operation ist eine atomare
|
||||
\ operation über alle drei propellerchips, kann also auch
|
||||
\ nicht aufgetrennt werden!
|
||||
ifnot: bel:load
|
||||
: bel:load
|
||||
52 adm:open .err \ datei öffnen
|
||||
b[
|
||||
0 [b!] 63 [b!] \ bella-loader starten
|
||||
10 0 do 06 [a!] [a@] [b!] loop \ header einlesen
|
||||
0A [a!] 0 [a.l!] \ 0 adm:seek
|
||||
[b@] <8 [b@] or \ dateilänge empfangen
|
||||
0 do 06 [a!] [a@] [b!] loop \ datei senden
|
||||
]b
|
||||
adm:close .err \ datei schließen
|
||||
;
|
||||
|
||||
\ ------------------------------------ mod:tools
|
||||
|
||||
ifnot: aload
|
||||
: aload \ name ( -- ) - administra-code laden
|
||||
mount? parsenw dup
|
||||
if adm:load 0 else drop 23 then .err ;
|
||||
|
||||
ifnot: bload
|
||||
: bload \ name ( -- ) - bellatrix-code laden
|
||||
mount? parsenw dup
|
||||
if bel:load 0 else drop 23 then .err ;
|
||||
|
||||
ifnot: .dmstatus \ ( dm -- ) - ausgabe marker-status
|
||||
: .dmstatus -1 = if ." frei" else ." gesetzt" then cr ;
|
||||
|
||||
ifnot: dm?
|
||||
: dm?
|
||||
." [root] : " 0 adm:dmget .dmstatus
|
||||
." [sys ] : " 1 adm:dmget .dmstatus
|
||||
." [usr ] : " 2 adm:dmget .dmstatus
|
||||
." [ A ] : " 3 adm:dmget .dmstatus
|
||||
." [ B ] : " 4 adm:dmget .dmstatus
|
||||
." [ C ] : " 5 adm:dmget .dmstatus ;
|
||||
|
||||
\ open name ( -- ) - datei lesend öffnen und auf fehler prüfen
|
||||
ifnot: open
|
||||
: open
|
||||
mount? parsenw dup
|
||||
if 52 adm:open else drop 23 then .err ;
|
||||
|
||||
\ close ( -- ) - geöffnete datei schließen
|
||||
ifnot: close
|
||||
: close
|
||||
adm:close .err ;
|
||||
|
||||
\ (cat) ( -- ) - alle zeichen der geöffneten datei ab
|
||||
\ lesemarke auf ausgabekanal bis zum eof ausgeben
|
||||
ifnot: (cat)
|
||||
: (cat) begin adm:getc emit adm:eof until ;
|
||||
|
||||
\ cat name ( -- ) - datei "name" komplett ausgeben
|
||||
ifnot: cat
|
||||
: cat open (cat) close ;
|
||||
|
||||
\ nextline ( -- ) - ausgabe der nächsten textzeile aus der
|
||||
\ geöffneten datei
|
||||
ifnot: nextline
|
||||
: nextline
|
||||
begin adm:getc dup emit 0d = adm:eof or until ;
|
||||
|
||||
\ nextlines ( n -- ) - ausgabe von n zeilen
|
||||
ifnot: nextlines
|
||||
: nextlines
|
||||
0 do adm:eof 0= if nextline then loop ;
|
||||
|
||||
\ less name ( -- ) - zeilenweise ausgabe der datei
|
||||
ifnot: less
|
||||
: less
|
||||
open begin 10 nextlines key 71 = adm:eof or until close ;
|
||||
|
||||
\ #C ( c1 -- ) prepend the character c1 to the number
|
||||
\ currently being formatted
|
||||
ifnot: #C
|
||||
: #C -1 >out W+! pad>out C! ;
|
||||
|
||||
\ .cogch ( n1 n2 -- ) print as x(y)
|
||||
ifnot: .cogch
|
||||
: .cogch <# 29 #C # 28 #C drop # #> .cstr ;
|
||||
|
||||
\ j ( -- n1 ) the second most current loop counter
|
||||
ifnot: j
|
||||
: j _rsptr COG@ 5 + COG@ ;
|
||||
|
||||
\ cog? ( -- )
|
||||
ifnot: cog?
|
||||
: cog?
|
||||
8 0 do ." Cog:" i dup . ." #io chan:"
|
||||
dup cognchan . cogstate C@
|
||||
dup 4 and if version W@ .cstr then
|
||||
dup 10 and if i cognumpad version W@ C@ over C@ -
|
||||
spaces .cstr then
|
||||
14 and if i cogio i cognchan 0 do
|
||||
i 4* over + 2+ W@ dup 0= if drop else
|
||||
space space j i .cogch ." ->" io>cogchan .cogch
|
||||
then
|
||||
loop
|
||||
drop then cr loop ;
|
||||
|
||||
\ jede erweiterung legt ein wort als startmarke
|
||||
\ nmit folgendem namen an:
|
||||
\ mod:xxx - softwaremodule
|
||||
\ drv:xxx - treiber
|
||||
\ lib:xxx - bibliotheken
|
||||
\ so kann mit den folgenden kommandos eine schnelle liste der
|
||||
\ vorhandenen erweiterungen abgerufen und mit forget
|
||||
\ aus dem system entfernt werden
|
||||
|
||||
\ mod? ( -- ) - anzeige der module
|
||||
ifnot: mod?
|
||||
: mod? c" mod:" _words ;
|
||||
|
||||
\ lib? ( -- ) - anzeige der bibliotheken
|
||||
ifnot: lib?
|
||||
: lib? c" lib:" _words ;
|
||||
|
Binary file not shown.
|
@ -0,0 +1,325 @@
|
|||
|
||||
: mod:vortrag ;
|
||||
|
||||
24 constant rows
|
||||
64 constant cols
|
||||
|
||||
wvariable lcol 7 lcol W!
|
||||
|
||||
ifnot: adm:fkt!s!b@ \ ( s fkt -- b )
|
||||
: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ;
|
||||
ifnot: adm:fkt!b!b@ \ ( b fkt -- b )
|
||||
: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ;
|
||||
ifnot: adm:fkt!b@ \ ( fkt -- b )
|
||||
: adm:fkt!b@ b[ [a!] [a@] ]b ;
|
||||
|
||||
ifnot: bel:char \ ( b -- )
|
||||
: bel:char b[ [b!] ]b ;
|
||||
ifnot: bel:ctrl!b! \ ( b ctrl -- )
|
||||
: bel:ctrl!b! b[ 0 [b!] 3 [b!] [b!] [b!] ]b ;
|
||||
ifnot: bel:fkt!b!b! \ ( b b fkt -- )
|
||||
: bel:fkt!b!b! b[ 0 [b!] [b!] [b!] [b!] ]b ;
|
||||
|
||||
ifnot: scr:bs \ ( -- ) - backspace
|
||||
: scr:bs 08 bel:char ;
|
||||
ifnot: scr:tab \ ( -- ) - tabulator
|
||||
: scr:tab 09 bel:char ;
|
||||
ifnot: scr:pos1 \ ( -- ) - cursor an zeilenanfang
|
||||
: scr:pos1 03 bel:char ;
|
||||
ifnot: scr:setcol \ ( colnr -- ) - farbe wählen 0..15
|
||||
: scr:setcol 06 bel:ctrl!b! ;
|
||||
ifnot: scr:sline \ ( row -- ) - anfangszeile scrollbereich
|
||||
: scr:sline 07 bel:ctrl!b! ;
|
||||
ifnot: scr:setx \ ( x -- ) - cursor position x setzen
|
||||
: scr:setx 02 bel:ctrl!b! ;
|
||||
ifnot: scr:sety \ ( y -- ) - cursor position y setzen
|
||||
: scr:sety 03 bel:ctrl!b! ;
|
||||
ifnot: scr:curon \ ( -- ) - cursor anschalten
|
||||
: scr:curon 04 bel:char ;
|
||||
ifnot: scr:curoff \ ( -- ) - cursor abschalten
|
||||
: scr:curoff 05 bel:char ;
|
||||
ifnot: scr:logo \ ( y x -- ) - hive logo
|
||||
: scr:logo 5 bel:fkt!b!b! ;
|
||||
|
||||
\ adm:setsound ( sfkt -- sstat ) - soundsystem verwalten
|
||||
\ sfkt:
|
||||
\ 0: hss-engine abschalten
|
||||
\ 1: hss-engine anschalten
|
||||
\ 2: dac-engine abschalten
|
||||
\ 3: dac-engine anschalten
|
||||
\ sstat - status/cognr startvorgang
|
||||
ifnot: adm:setsound
|
||||
: adm:setsound
|
||||
5C adm:fkt!b!b@ ;
|
||||
|
||||
\ wav:start ( cstr -- err )
|
||||
ifnot: wav:start
|
||||
: wav:start
|
||||
96 adm:fkt!s!b@ ;
|
||||
|
||||
\ wav:stop ( -- )
|
||||
ifnot: wav:stop
|
||||
: wav:stop
|
||||
97 adm:fkt!b@ drop ;
|
||||
|
||||
\ won
|
||||
ifnot: won
|
||||
: won
|
||||
0 adm:setsound 3 adm:setsound 2drop ;
|
||||
|
||||
\ woff
|
||||
ifnot: woff
|
||||
: woff
|
||||
2 adm:setsound 1 adm:setsound 2drop ;
|
||||
|
||||
: lcol@ lcol W@ ; \ ( -- col )
|
||||
|
||||
: lines \ ( n -- )
|
||||
0 do cr loop ;
|
||||
|
||||
: waitkey
|
||||
scr:curoff cr key drop scr:bs scr:bs scr:bs scr:curon ;
|
||||
|
||||
: nextpage
|
||||
scr:curoff scr:pos1 lcol@ spaces ." -->" key drop scr:bs scr:bs scr:bs scr:curon ;
|
||||
|
||||
: .head \ ( -- )
|
||||
4 scr:setcol scr:pos1 lcol@ spaces ;
|
||||
|
||||
: .bullet \ ( -- )
|
||||
0 scr:setcol scr:pos1 lcol@ spaces 0f emit space ;
|
||||
|
||||
: .number \ ( n -- n )
|
||||
0 scr:setcol scr:pos1 lcol@ spaces dup . 1+
|
||||
2e emit space ;
|
||||
|
||||
: .line \ ( -- )
|
||||
cr 0 scr:setcol scr:pos1 lcol@ 2+ spaces ;
|
||||
|
||||
: .sub \ ( -- )
|
||||
0 scr:setcol scr:pos1 lcol@ 2+ spaces ;
|
||||
|
||||
wvariable xpos 1 xpos W!
|
||||
wvariable ypos 1 ypos W!
|
||||
|
||||
: pos! \ ( x y -- )
|
||||
ypos W! xpos W! ;
|
||||
|
||||
: pos@ \ ( -- x y )
|
||||
xpos W@ ypos W@ ;
|
||||
|
||||
: nextline
|
||||
ypos W@ 1+ ypos W! ;
|
||||
|
||||
: move \ ( x y -- )
|
||||
1 delms pos@ scr:sety scr:setx ;
|
||||
|
||||
|
||||
: btop0 \ ( -- )
|
||||
move 9f emit 6 0 do 90 emit loop 9e emit nextline ;
|
||||
|
||||
: bbot0 \ ( -- )
|
||||
move 9d emit 6 0 do 90 emit loop 9c emit nextline ;
|
||||
|
||||
: btop1 \ ( -- )
|
||||
move 2 spaces 9f emit 6 0 do 90 emit loop 9e emit nextline ;
|
||||
|
||||
: bbot1 \ ( -- )
|
||||
move 2 spaces 9d emit 6 0 do 90 emit loop 9c emit nextline ;
|
||||
|
||||
: bmid0 \ ( -- )
|
||||
move 91 emit ." COG " 95 emit 90 emit bb emit nextline
|
||||
move 91 emit ." " 95 emit 90 emit aa emit nextline ;
|
||||
|
||||
: bmid1 \ ( -- )
|
||||
move a9 emit 90 emit 94 emit ." COG " 91 emit nextline
|
||||
move ba emit 90 emit 94 emit ." " 91 emit nextline ;
|
||||
|
||||
: bmid2 \ ( -- )
|
||||
move a9 emit 90 emit 94 emit ." SER "
|
||||
95 emit 90 emit bb emit ." [TERMINAL]" nextline
|
||||
move ba emit 90 emit 94 emit ." " 91 emit nextline ;
|
||||
|
||||
: bmid3 \ ( -- )
|
||||
move a9 emit 90 emit 94 emit ." VGA "
|
||||
95 emit 90 emit bb emit ." [BELLATRIX]" nextline
|
||||
move ba emit 90 emit 94 emit ." KBD " 91 emit nextline ;
|
||||
|
||||
: bmid4 \ ( -- )
|
||||
move 91 emit ." COG " 95 emit 90 emit bb emit
|
||||
." Zeichenausgabekanal (emit)" nextline
|
||||
move 91 emit ." " 95 emit 90 emit aa emit
|
||||
." Zeicheneingabekanal (key)" nextline ;
|
||||
|
||||
: cog0 \ ( x y -- )
|
||||
0 scr:setcol pos! btop0 bmid0 bbot0 ;
|
||||
|
||||
: cog1 \ ( x y -- )
|
||||
0 scr:setcol pos! btop1 bmid1 bbot1 ;
|
||||
|
||||
: cog3 \ ( x y -- )
|
||||
0 scr:setcol pos! btop0 bmid4 bbot0 ;
|
||||
|
||||
: cogext \ ( x y -- )
|
||||
0 scr:setcol pos! btop1 bmid2 bbot1 ;
|
||||
|
||||
: cogint \ ( x y -- )
|
||||
0 scr:setcol pos! btop1 bmid3 bbot1 ;
|
||||
|
||||
: drvser
|
||||
0 scr:setcol 2dup cog0 swap a + swap cogext ;
|
||||
|
||||
: drvint
|
||||
0 scr:setcol 2dup cog0 swap a + swap cogint ;
|
||||
|
||||
: p0
|
||||
0 scr:sline cls 5 lines
|
||||
14 1c scr:curoff scr:logo won c" woodz.wav" wav:start drop
|
||||
key drop scr:curon wav:stop woff ;
|
||||
|
||||
: i1
|
||||
0 scr:sline cls 3 lines
|
||||
.head ." Implementierungsvarianten" cr waitkey
|
||||
.bullet ." Forth-Diamond: Master & Slaves = PropForth" waitkey cr
|
||||
.sub ." Nachteil: Programmierung aller Treiber in Forth" waitkey cr
|
||||
.bullet ." Forth-Spin: Forth mit SPIN-Interface" waitkey cr
|
||||
.sub ." Vorteil: Nutzung fertiger Treiber" waitkey
|
||||
.sub ." Nachteil: hoher Ressourcenverbrauch" waitkey cr
|
||||
.bullet ." Forth-Funktionskomplexe: " cr cr
|
||||
.sub ." Master = Forth" cr
|
||||
.sub ." Slaves = Spin-Funktionsbibliotheken" cr
|
||||
.sub ." Interface Forth <--> Spin = 8Bit-Bus" cr cr
|
||||
nextpage ;
|
||||
|
||||
: i2
|
||||
0 scr:sline cls 3 lines
|
||||
.head ." Implementierungsvarianten" cr cr
|
||||
.bullet ." Forth-Funktionskomplexe: " cr cr
|
||||
.sub ." Master = Forth" cr
|
||||
.sub ." Slaves = Spin-Funktionsbibliotheken" cr
|
||||
.sub ." Interface Forth <--> Spin = 8Bit-Bus" cr waitkey
|
||||
.bullet ." Nachteile:" cr cr
|
||||
.sub ." Spin --> Compiler noch auf Host" cr waitkey
|
||||
.bullet ." Vorteile:" cr cr
|
||||
.sub ." Code ist schon vorhanden (TriOS)" waitkey
|
||||
.sub ." Gegenseitige Befruchtung von Forth & TriOS" waitkey
|
||||
.sub ." Maximale Ressourcen für Forth im Master" waitkey
|
||||
.sub ." Spin-Code kann später auch durch Forth ersetzt werden" cr
|
||||
nextpage ;
|
||||
|
||||
: i3
|
||||
0 scr:sline cls 3 lines
|
||||
.head ." Ablauf der Implementierung" cr waitkey
|
||||
.bullet ." Ausgangslage: " cr cr
|
||||
.sub ." Forth mit Terminalzugriff" cr waitkey
|
||||
.bullet ." Plan:" cr cr
|
||||
.sub ." 1. Busroutine um auf Slaves zuzugreifen" waitkey
|
||||
.sub ." 2. Integration VGA/Keyboard/SD-Card" waitkey
|
||||
.sub ." 3. Autostart" cr cr
|
||||
nextpage ;
|
||||
|
||||
|
||||
: p1
|
||||
0 scr:sline cls 1 lines
|
||||
.head ." Buszugriff" cr cr
|
||||
.bullet ." ! ( n adr -- ) store - Wert im RAM speichern" cr
|
||||
.bullet ." @ ( adr -- n ) fetch - Wert aus RAM lesen" cr waitkey
|
||||
.bullet ." c! c@ p! p@ - Abwandlungen der Grundform" cr waitkey
|
||||
.bullet ." s! ( c adr -- ) - Byte an Slave senden" cr
|
||||
.bullet ." s@ ( adr -- c ) - Byte von Slave empfangen" cr waitkey
|
||||
.bullet ." b! ( c -- ) - Byte an Bellatrix senden" cr
|
||||
.bullet ." b@ ( -- c ) - Byte von Bellatrix empfangen" cr
|
||||
.bullet ." a! ( c -- ) - Byte an Administra senden" cr
|
||||
.bullet ." a@ ( -- c ) - Byte von Administra empfangen" cr cr
|
||||
.head ." Beispiele :" cr cr
|
||||
.bullet ." 01 b! - Bildschirm löschen" waitkey
|
||||
.bullet ." : cls 01 b! ; " waitkey
|
||||
.bullet ." : bel:key 0 b! 2 b! b@ ; \ ( -- key )" cr
|
||||
nextpage ;
|
||||
|
||||
: p2
|
||||
0 scr:sline cls 5 lines
|
||||
.head ." IO-Kanäle/Pipes" cr waitkey
|
||||
9 8 cog3 key drop
|
||||
9 c cog3
|
||||
.line ." ..."
|
||||
9 11 cog3
|
||||
cr cr
|
||||
nextpage ;
|
||||
|
||||
: p3
|
||||
0 scr:sline cls 5 lines
|
||||
.head ." Serieller Treiber" cr cr
|
||||
9 8 drvser
|
||||
9 c cog3
|
||||
.line ." ..."
|
||||
9 11 cog3
|
||||
cr cr
|
||||
nextpage ;
|
||||
|
||||
: p4
|
||||
0 scr:sline cls 5 lines
|
||||
.head ." VGA/Keyboard-Treiber" cr cr
|
||||
9 8 drvser
|
||||
9 c drvint
|
||||
.line ." ..."
|
||||
9 11 cog3
|
||||
cr cr
|
||||
nextpage ;
|
||||
|
||||
: p5
|
||||
0 scr:sline cls 5 lines
|
||||
.head ." Treiber: VGA" cr cr
|
||||
9 8 drvint cr
|
||||
.line ." : drv-vga "
|
||||
.line ." begin"
|
||||
.line ." key?"
|
||||
.line ." if key b! then"
|
||||
.line ." 0 until ;"
|
||||
cr cr
|
||||
nextpage ;
|
||||
|
||||
: p6
|
||||
0 scr:sline cls 5 lines
|
||||
.head ." Treiber: Keyboard" cr cr
|
||||
9 8 drvint cr
|
||||
.line ." : drv-key"
|
||||
.line ." begin"
|
||||
.line ." bel:keystat"
|
||||
.line ." if bel:key emit then"
|
||||
.line ." 0 until ;"
|
||||
cr cr
|
||||
nextpage ;
|
||||
|
||||
: p7
|
||||
0 scr:sline cls 5 lines
|
||||
.head ." Treiber: Gesamt" cr cr
|
||||
9 8 drvint cr
|
||||
.line ." : drv:int"
|
||||
.line ." begin"
|
||||
.line ." \ input --> vga/video"
|
||||
.line ." 200 0 do key?"
|
||||
.line ." if key b[ [b!] ]b then loop"
|
||||
.line ." \ output <-- keyboard"
|
||||
.line ." b[ [key?]"
|
||||
.line ." if [key] [emit] then ]b"
|
||||
.line ." 0 until ;"
|
||||
cr cr
|
||||
nextpage ;
|
||||
|
||||
: p8
|
||||
0 scr:sline cls 5 lines
|
||||
.head ." Semaphoren" cr waitkey
|
||||
.bullet ." : bel:key 0 b! 2 b! b@ ; \ ( -- key )" cr waitkey
|
||||
.bullet ." : bel:key bon 0 b! 2 b! b@ boff ;" cr waitkey
|
||||
.bullet ." [ ... ]" cr waitkey
|
||||
.bullet ." b[ ... ]b" cr waitkey
|
||||
.bullet ." : bel:key b[ 0 b! 2 b! b@ ]b ;" cr waitkey
|
||||
.bullet ." : bel:key b[ 0 [b!] 2 [b!] [b@] ]b ;" cr waitkey
|
||||
.bullet ." : bel:key 2 0 b[ [b!] [b!] [b@] ]b ;" cr cr
|
||||
cr cr
|
||||
nextpage ;
|
||||
|
||||
: run
|
||||
begin p0 i1 i2 i3 p1 p2 p3 p4 p5 p6 p7 p8 0 until ;
|
||||
|
Binary file not shown.
|
@ -0,0 +1,54 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: lib:wav
|
||||
: lib:wav ;
|
||||
|
||||
\ kommandoformen
|
||||
|
||||
ifnot: adm:fkt!b@ \ ( fkt -- b )
|
||||
: adm:fkt!b@ b[ [a!] [a@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!s!b@ \ ( s fkt -- b )
|
||||
: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!l@l@ \ ( fkt -- l l )
|
||||
: adm:fkt!l@l@ b[ [a!] [a.l@] [a.l@] ]b ;
|
||||
|
||||
\ wave-funktionen
|
||||
|
||||
\ wav:start ( cstr -- err )
|
||||
ifnot: wav:start
|
||||
: wav:start
|
||||
96 adm:fkt!s!b@ ;
|
||||
|
||||
\ wav:stop ( -- )
|
||||
ifnot: wav:stop
|
||||
: wav:stop
|
||||
97 adm:fkt!b@ drop ;
|
||||
|
||||
\ wav:status ( -- status )
|
||||
ifnot: wav:status
|
||||
: wav:status
|
||||
98 adm:fkt!b@ ;
|
||||
|
||||
\ wav:leftvol ( vol -- )
|
||||
ifnot: wav:leftvol
|
||||
: wav:leftvol
|
||||
99 adm:fkt!b! ;
|
||||
|
||||
\ wav:rightvol ( vol -- )
|
||||
ifnot: wav:rightvol
|
||||
: wav:rightvol
|
||||
9A adm:fkt!b! ;
|
||||
|
||||
\ wav:pause ( -- )
|
||||
ifnot: wav:pause
|
||||
: wav:pause
|
||||
9B adm:fkt!b@ drop ;
|
||||
|
||||
\ wav:position ( -- len pos )
|
||||
ifnot: wav:position
|
||||
: wav:position
|
||||
9C adm:fkt!l@l@ ;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
fl
|
||||
|
||||
\ _words ( cstr -- ) prints the words in the forth dictionary starting with cstr, 0 prints all
|
||||
: _words lastnfa
|
||||
begin
|
||||
2dup swap dup if npfx else 2drop -1 then
|
||||
if dup .strname space then
|
||||
nfa>next dup 0=
|
||||
until 2drop cr ;
|
||||
|
||||
\ words ( -- ) prints the words in the forth dictionary, if the pad has another string following, with that prefix
|
||||
: words parsenw _xwords ;
|
||||
|
||||
: t1 1000 0 do i . loop ;
|
||||
: t2 1000 0 do ." test " loop ;
|
Binary file not shown.
|
@ -0,0 +1,93 @@
|
|||
|
||||
hex
|
||||
|
||||
ifnot: mod:wplay
|
||||
: mod:wplay ;
|
||||
|
||||
\ kommandoformate
|
||||
|
||||
ifnot: adm:fkt!s!b@ \ ( s fkt -- b )
|
||||
: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b!b@ \ ( b fkt -- b )
|
||||
: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ;
|
||||
|
||||
ifnot: adm:fkt!b@ \ ( fkt -- b )
|
||||
: adm:fkt!b@ b[ [a!] [a@] ]b ;
|
||||
|
||||
\ wave-funktionen
|
||||
|
||||
\ wav:start ( cstr -- err )
|
||||
ifnot: wav:start
|
||||
: wav:start
|
||||
96 adm:fkt!s!b@ ;
|
||||
|
||||
\ wav:stop ( -- )
|
||||
ifnot: wav:stop
|
||||
: wav:stop
|
||||
97 adm:fkt!b@ drop ;
|
||||
|
||||
\ wav:status ( -- status )
|
||||
ifnot: wav:status
|
||||
: wav:status
|
||||
98 adm:fkt!b@ ;
|
||||
|
||||
\ adm-funktionen
|
||||
|
||||
\ adm:setsound ( sfkt -- sstat ) - soundsystem verwalten
|
||||
\ sfkt:
|
||||
\ 0: hss-engine abschalten
|
||||
\ 1: hss-engine anschalten
|
||||
\ 2: dac-engine abschalten
|
||||
\ 3: dac-engine anschalten
|
||||
\ sstat - status/cognr startvorgang
|
||||
ifnot: adm:setsound
|
||||
: adm:setsound
|
||||
5C adm:fkt!b!b@ ;
|
||||
|
||||
|
||||
\ metafunktionen
|
||||
|
||||
\ won
|
||||
ifnot: won
|
||||
: won
|
||||
0 adm:setsound 3 adm:setsound 2drop ;
|
||||
|
||||
\ woff
|
||||
ifnot: woff
|
||||
: woff
|
||||
2 adm:setsound 1 adm:setsound 2drop ;
|
||||
|
||||
\ wend? ( -- t/f )
|
||||
ifnot: wend?
|
||||
: wend?
|
||||
begin 50 delms key? dup if key drop then wav:status 0= or until ;
|
||||
|
||||
\ (wplay) ( cstr -- )
|
||||
ifnot: (wplay)
|
||||
: (wplay) \ ( cstr -- )
|
||||
." Datei : " dup .cstr cr wav:start .err wend? wav:stop ;
|
||||
|
||||
\ wplay name ( -- )
|
||||
ifnot: wplay
|
||||
: wplay
|
||||
won parsenw (wplay) woff ;
|
||||
|
||||
\ files? ( -- cnt ) - anzahl dateien im dir
|
||||
ifnot: files?
|
||||
: files?
|
||||
adm:diropen
|
||||
0 begin adm:nextfile swap 1+ swap 0= until 3 - padbl ;
|
||||
|
||||
\ filenr? ( nr -- )
|
||||
ifnot: filenr?
|
||||
: filenr?
|
||||
adm:diropen
|
||||
0 do adm:nextfile drop loop ;
|
||||
|
||||
\ wdirplay ( -- ) - gesamtes verzeichnis abspielen
|
||||
\ im verzeichnis dürfen nur wav-dateien sein!
|
||||
ifnot: wdirplay
|
||||
: wdirplay
|
||||
won files? dup ." Dateien : " . cr
|
||||
0 do i dup 1 + . 3 + filenr? pad (wplay) loop padbl woff ;
|
Binary file not shown.
|
@ -0,0 +1,797 @@
|
|||
{\rtf1\ansi\ansicpg1252\cocoartf949
|
||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Verdana;}
|
||||
{\colortbl;\red255\green255\blue255;\red0\green5\blue50;\red238\green238\blue238;}
|
||||
\margl1440\margr1440\vieww12580\viewh18760\viewkind0
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
||||
|
||||
\f0\b\fs24 \cf0 \ul \ulc0 FemtoBasic Manual - Version 3.006
|
||||
\b0 \ulnone \
|
||||
\
|
||||
Program lines consist of a line number from 1 to 65535, then a space,\
|
||||
then one or more statements separated by a colon (":"). Most statements\
|
||||
can be given without a line number and will be executed immediately if so.\
|
||||
\
|
||||
If a line is entered with the same line number as that of an existing line in\
|
||||
the current program, the existing line is deleted and the new line is stored.\
|
||||
\
|
||||
A line number by itself may be entered. Any existing line in the current\
|
||||
program with the same line number will be deleted. No new line will be\
|
||||
stored.\
|
||||
\
|
||||
When FemtoBasic is first started after a Propeller reset, if an SD card is\
|
||||
provided and it has a file "autoexec.bas" in its root directory, then the\
|
||||
line 'LOAD "autoexec.bas" : RUN' is automatically executed.\
|
||||
\
|
||||
The ESC key is a "break key". If it is entered, the running program will\
|
||||
stop after the current statement finishes executing. PAUSE and IRBRECV\
|
||||
are handled specially so the "break key" can interrupt their execution.\
|
||||
\
|
||||
Pre-compiled binaries are provided for both a VGA display and a TV\
|
||||
display and for either the Propeller Demo Board, Propeller Proto Board,\
|
||||
or a Hydra. The Hydra version cannot use an SD card with a VGA\
|
||||
display because the SD card interface uses the same I/O pins as the\
|
||||
VGA display. The names of the binary files indicate which display and\
|
||||
board they are intended for.\
|
||||
\
|
||||
The basic SD card wiring is shown below. "Pull-up" refers to a 20K\
|
||||
pull up resistor from the pin indicated to +3.3V. For the Demo Board\
|
||||
version, the pins are as indicated below. For the Proto Board version,\
|
||||
P0 = I/O pin 8, P1 = I/O pin 9, P2 = I/O pin 10, and P3 = I/O pin 11. For\
|
||||
the Hydra version, P0 = I/O pin 16, P1 = I/O pin 17, P2 = I/O pin 18, and\
|
||||
P3 = I/O pin 19.\
|
||||
\
|
||||
\pard\pardeftab720\ql\qnatural
|
||||
|
||||
\f1 \cf2 \cb3 SD CARD Socket Pin-out:\
|
||||
\'a0\
|
||||
PIN\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 SD CARD\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 Propeller\
|
||||
-----------------------------------------------------\
|
||||
\'a01\'a0(NC)\
|
||||
\'a02\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-9) DAT2\'a0\'a0\'a0 Pull-up\
|
||||
\'a03\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0(PIN-1) CS\'a0\'a0\'a0\'a0\'a0 Pull-up\'a0\'a0\'a0 P3\
|
||||
\'a04\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-2) DI\'a0\'a0\'a0\'a0\'a0 Pull-up\'a0\'a0\'a0\'a0 P2\
|
||||
\'a05\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-3) GND\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 GND\
|
||||
\'a06\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-4) +3.3\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 VCC\
|
||||
\'a07\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-5) CLK\'a0\'a0\'a0\'a0 Pull-up\'a0\'a0\'a0\'a0 P1\
|
||||
\'a08\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-6) GND\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 GND\'a0\'a0\'a0\'a0\'a0 \
|
||||
\'a09\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-7) DO\'a0\'a0\'a0\'a0\'a0 Pull-up\'a0\'a0\'a0\'a0 P0\
|
||||
10\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-8) DAT1\'a0\'a0 Pull-up\
|
||||
11\'a0(CD SW)\
|
||||
|
||||
\f0 \cf0 \cb1 \
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
||||
|
||||
\b \cf0 \ul Expressions\
|
||||
|
||||
\b0 \ulnone \
|
||||
Expressions consist of variables, constants, and "pseudo-variables"\
|
||||
that function like variables, but may have complex actions like FILE or\
|
||||
EEPROM[5]. Constants may be decimal, hexadecimal (prefixed with "$"),\
|
||||
or binary (prefixed with "%"). All expressions use 32-bit integer values.\
|
||||
\
|
||||
<var>\
|
||||
\
|
||||
There are 26 variables designated by the letters A through Z.\
|
||||
Upper and lower case letters are equivalent.\
|
||||
\
|
||||
INA [ <expr> \{.. <expr>\} ]\
|
||||
\
|
||||
This has the value of the specified input pin or pins. If two pin values are\
|
||||
given, the first is the most significant bit number and the second is the\
|
||||
least significant bit number of the value. The pin or pins specified are\
|
||||
changed to input mode (the default).\
|
||||
\
|
||||
BYTE [ <expr> ]\
|
||||
\
|
||||
This has the value of the main memory byte at the address provided.\
|
||||
\
|
||||
WORD [ <expr> ]\
|
||||
\
|
||||
This has the value of the main memory word at the address provided.\
|
||||
The least significant bit of the address is ignored.\
|
||||
\
|
||||
LONG [ <expr> ]\
|
||||
\
|
||||
This has the value of the main memory long word at the address provided.\
|
||||
The least significant two bits of the address are ignored.\
|
||||
\
|
||||
EEPROM [ <expr> \{, <expr>\} ]\
|
||||
\
|
||||
This has the value of the byte in the EEPROM attached to the boot I2C bus\
|
||||
(on pins 28-29) at the address specified. If two expressions are provided,\
|
||||
the first gives the pin number of the SCL line of the EEPROM while the\
|
||||
second expression is the address. The address may be any value from\
|
||||
zero to $7FFFF and the upper 3 bits are used to form the device select code.\
|
||||
\
|
||||
FILE\
|
||||
\
|
||||
This has the value of the next byte in the currently open SD card file or -1\
|
||||
at the end of the file. The file must be open for reading.\
|
||||
\
|
||||
MEM\
|
||||
\
|
||||
This has the value of the amount of space available for program storage.\
|
||||
\
|
||||
CNT\
|
||||
\
|
||||
The current system clock value.\
|
||||
\
|
||||
PHSA\
|
||||
\
|
||||
The cog counter phase register A value.\
|
||||
\
|
||||
PHSB\
|
||||
\
|
||||
The cog counter phase register B value.\
|
||||
\
|
||||
FRQA\
|
||||
\
|
||||
The cog counter frequency register A value.\
|
||||
\
|
||||
FRQB\
|
||||
\
|
||||
The cog counter frequency register B value.\
|
||||
\
|
||||
CTRA\
|
||||
\
|
||||
The cog counter control register A value.\
|
||||
\
|
||||
CTRB\
|
||||
\
|
||||
The cog counter control register B value.\
|
||||
\
|
||||
KEYCODE\
|
||||
\
|
||||
The value of the next keyboard key value or zero if the keyboard buffer\
|
||||
is empty.\
|
||||
\
|
||||
RND <expr>\
|
||||
\
|
||||
The value is a pseudo-random number in the range zero to one less than\
|
||||
that of the expression given.\
|
||||
\
|
||||
- <expr>\
|
||||
! <expr>\
|
||||
\
|
||||
"-" is negate. "!" is bit-wise logical not.\
|
||||
\
|
||||
<9> SHL <9>\
|
||||
<9> SHR <9>\
|
||||
<9> ROL <9>\
|
||||
<9> ROR <9>\
|
||||
<9> SAR <9>\
|
||||
<9> REV <9>\
|
||||
\
|
||||
"SHL" is logical shift left. "SHR" is logical shift right. "ROL" is rotate left.\
|
||||
"ROR" is rotate right. "SAR" is arithmetic shift right. "REV" is bit reverse.\
|
||||
In all cases, the value to be shifted is the left operand and the shift count\
|
||||
is the right operand. "REV" reverses the order of the specified number of\
|
||||
least significant bits with the most significant bits set to zero.\
|
||||
\
|
||||
<8> & <8>\
|
||||
\
|
||||
"&" is bit-wise logical and.\
|
||||
\
|
||||
<7> | <7>\
|
||||
\
|
||||
"|" is bit-wise logical or\
|
||||
\
|
||||
<6> *<6>\
|
||||
<6> / <6>\
|
||||
<6> // <6>\
|
||||
\
|
||||
"*" is a 32 bit unsigned multiplication. "/" is the quotient of a 32 bit unsigned\
|
||||
division. "//" is the remainder of a 32 bit unsigned division.\
|
||||
\
|
||||
<5> + <5>\
|
||||
<5> - <5>\
|
||||
\
|
||||
"+" is a 32 bit addition. "-" is a 32 bit subtraction\
|
||||
\
|
||||
<4> = <4>\
|
||||
<4> < <4>\
|
||||
<4> > <4>\
|
||||
<4> <= <4>\
|
||||
<4> >= <4>\
|
||||
<4> <> <4>\
|
||||
\
|
||||
"=" is equal to. "<" is less than. ">" is greater than.\
|
||||
"<=" is less than or equal to. ">=" is greater or equal to.\
|
||||
"<>" is not equal to.\
|
||||
\
|
||||
NOT <3>\
|
||||
\
|
||||
"NOT" is logical not.\
|
||||
\
|
||||
<2> AND <2>\
|
||||
\
|
||||
"AND" is logical and.\
|
||||
\
|
||||
<1> OR <1>\
|
||||
\
|
||||
"OR" is logical or.\
|
||||
\
|
||||
Note that the numbers in the brackets (<n>) are used to\
|
||||
indicate the operator precedence.\
|
||||
\
|
||||
|
||||
\b \ul Statements
|
||||
\b0 \ulnone \
|
||||
\
|
||||
Note that multiple statements may be given on a line separated by\
|
||||
a colon (":"). There are some restrictions on what can be combined on\
|
||||
a line. These are described in the individual statements' descriptions.\
|
||||
\
|
||||
\{LET\} <var> = <expr>\
|
||||
\
|
||||
Set the variable <var> to the value of the expression <expr>.\
|
||||
\
|
||||
INPUT \{ "<prompt>";\} <var> \{,<var>\}\
|
||||
\
|
||||
If given, the <prompt> is displayed and an input line may be entered.\
|
||||
For each variable given, an expression is evaluated from the input line.\
|
||||
The expressions may be separated by commas (",") or, if unambiguous,\
|
||||
by spaces. These expressions may contain variable names, operators,\
|
||||
or "pseudo-variables". If more expressions are given than variables,\
|
||||
the excess are ignored. An error is treated as if it occurred on the line\
|
||||
where the INPUT statement is given.\
|
||||
\
|
||||
PRINT \{\{"<string>" | <expr> \} \{, | ;\}\}\
|
||||
\
|
||||
A series of expressions or string constants are given, separated by\
|
||||
commas (",") or semicolons (";"). If a comma is used, enough spaces\
|
||||
are inserted to display the next item at the next display column divisible\
|
||||
by 8. If a semicolon is used, the next item begins at the next column.\
|
||||
If the statement ends with a comma or semicolon, an end of line is not\
|
||||
inserted. A PRINT statement by itself causes an end of line to be displayed\
|
||||
\
|
||||
GOTO <expr>\
|
||||
\
|
||||
Go to the label whose value is equal to the expression\
|
||||
\
|
||||
GOSUB <expr>\
|
||||
\
|
||||
Call (as a subroutine) the label whose value is equal to the expression.\
|
||||
Note that a GOSUB must be the only or last statement on a line.\
|
||||
\
|
||||
RETURN\
|
||||
\
|
||||
Return from a GOSUB call\
|
||||
\
|
||||
REM <comment>\
|
||||
\
|
||||
The rest of the line in the program is considered part of the comment and\
|
||||
is otherwise ignored.\
|
||||
\
|
||||
NEW\
|
||||
\
|
||||
Erase the current program and clear all the variables.\
|
||||
\
|
||||
LIST \{<expr> \{,<expr>\}\}\
|
||||
\
|
||||
List the current program. If no expressions are given, the whole program\
|
||||
is listed. If one expression is given, that line is listed. If two expressions\
|
||||
are given, all lines between those two values are listed.\
|
||||
\
|
||||
RUN\
|
||||
\
|
||||
Clear all the variables (to zero) and start executing the current program\
|
||||
from the first line.\
|
||||
\
|
||||
OPEN "<file>", \{R | W | A \}\
|
||||
\
|
||||
Open the specified file on the SD card in the mode requested (R - read,\
|
||||
W - write, A - append). If a file is already open, it is closed first. Only one\
|
||||
file may be open at a time.\
|
||||
\
|
||||
READ <var> \{,<var>\}\
|
||||
\
|
||||
Read a line from the currently opened SD card file and set the variables\
|
||||
specified to the expressions supplied on that line. The expressions may\
|
||||
be separated by commas or, if unambiguous, may be separated by spaces.\
|
||||
These expressions may be any expression including operators, variables,\
|
||||
pseudo-variables (like CNT). Effectively, this is as if "<var> = <expr>" were\
|
||||
executed for each variable given and each expression in the SD card file.\
|
||||
\
|
||||
WRITE \{\{"<string>" | <expr> \} \{, | ;\}\}\
|
||||
\
|
||||
This works just like the PRINT statement except that the characters produced\
|
||||
are written to the currently opened SD card file. An end of line is written as\
|
||||
a carriage return / line feed pair (ASCII CR/LF ... 13, 10).\
|
||||
\
|
||||
CLOSE\
|
||||
\
|
||||
Close the currently opened SD card file, if any.\
|
||||
\
|
||||
DELETE "<file>"\
|
||||
\
|
||||
Delete the specified SD card file. Any opened SD card file will be closed.\
|
||||
\
|
||||
RENAME "<file>", "<file>"\
|
||||
\
|
||||
Rename the specified SD card file. Any opened SD card file will be closed.\
|
||||
This is not currently implemented and will produce an error message.\
|
||||
\
|
||||
FILES\
|
||||
\
|
||||
List all files on the SD card (at the root level). Neither subdirectories nor the files\
|
||||
within them are included in this listing. Any opened SD card file will be closed.\
|
||||
\
|
||||
SAVE\
|
||||
\
|
||||
Save the current program to an otherwise unused area in the boot EEPROM.\
|
||||
Note that downloading a program to the EEPROM using the Propeller Tool or\
|
||||
an equivalent downloading program will erase any saved program.\
|
||||
\
|
||||
SAVE [ <expr> \{, <expr>\} ]\
|
||||
\
|
||||
This saves the current program in the EEPROM attached to the boot I2C bus\
|
||||
(on pins 28-29) at the address specified. If two expressions are provided,\
|
||||
the first gives the pin number of the SCL line of the EEPROM while the\
|
||||
second expression is the address. The address may be any value from\
|
||||
zero to $7FFFF and the upper 3 bits are used to form the device select code.\
|
||||
The address is adjusted to 2 bytes below the next 64 byte boundary and the\
|
||||
total program length is stored in those two bytes followed by the program itself.\
|
||||
If the address is adjusted upwards, only the last two bytes of that 64 byte block\
|
||||
are changed.\
|
||||
\
|
||||
SAVE "<file>"\
|
||||
\
|
||||
Save the current program to the specified file on a SD card. Any existing file\
|
||||
by that name will be overwritten with the program which will be saved in text\
|
||||
file format, as if they were displayed with the LIST statement.\
|
||||
\
|
||||
LOAD\
|
||||
\
|
||||
Erase the current program and load in a program previously saved with the\
|
||||
SAVE statement.\
|
||||
\
|
||||
LOAD [ <expr> \{, <expr>\} ]\
|
||||
\
|
||||
Erase the current program and load in a program previously saved with the\
|
||||
SAVE [ <expr> \{, <expr>\} ] statement.\
|
||||
\
|
||||
LOAD "<file>"\
|
||||
\
|
||||
Erase the current program and load in a program from an SD card file. This\
|
||||
program must be in text format, just as if it were to be typed in. All lines must\
|
||||
be numbered (with a line number) except lines that are completely blank.\
|
||||
\
|
||||
FOR <var> = <expr> TO <expr> \{STEP <expr>\}\
|
||||
\
|
||||
This sets up a standard Basic FOR/NEXT loop. The variable is set to the value\
|
||||
of the first expression and tested against the limit given by the value of the\
|
||||
second expression (which is evaluated only once). The optional step size\
|
||||
may be positive or negative. If negative, the limit test is appropriately changed.\
|
||||
The FOR statement must be the last statement on a multi-statement line and\
|
||||
improperly nested FOR/NEXT statement pairs may cause incorrect execution\
|
||||
without an error message. Default STEP value is +1.\
|
||||
\
|
||||
NEXT <var>\
|
||||
\
|
||||
This terminates a standard Basic FOR/NEXT loop. The STEP value is added\
|
||||
to the variable and the result is tested against the limit value. If still within the\
|
||||
limit, program execution continues with the statement after the matching FOR\
|
||||
statement. If not, execution continues with the next statement.\
|
||||
\
|
||||
OUTA [ <expr> \{.. <expr>\} ] = <expr>\
|
||||
\
|
||||
This sets the specified output pin or pins to the expression to the right of the\
|
||||
assignment. If one pin value is given, that is the pin to be changed. If two\
|
||||
pin values are given, the first is the most significant bit number and the\
|
||||
second is the least significant bit number of the value. The pin or pins\
|
||||
specified are changed to output mode.\
|
||||
\
|
||||
PAUSE <expr> \{, <expr>\}\
|
||||
\
|
||||
The program is paused for the number of milliseconds given by the first\
|
||||
(or only) value given. If two values are given, the first is in milliseconds\
|
||||
while the second is in microseconds and they're added together for the\
|
||||
total pause time. The minimum pause time is 50us. If the pause time is\
|
||||
more than 10ms, The pause statement is interrupted after 10ms and\
|
||||
reexecuted with a 10ms shorter pause time. This is to allow for the\
|
||||
interruption of the program using a "break key". The PAUSE statement\
|
||||
must be the first or only statement on a line.\
|
||||
\
|
||||
BYTE [ <expr> ] = <expr>\
|
||||
\
|
||||
This sets the value of the main memory byte at the address provided to\
|
||||
the expression on the right side of the assignment.\
|
||||
\
|
||||
WORD [ <expr> ] = <expr>\
|
||||
\
|
||||
This sets the value of the main memory word at the address provided to\
|
||||
the expression on the right side of the assignment. The least significant\
|
||||
bit of the address is ignored.\
|
||||
\
|
||||
LONG [ <expr> ] = <expr>\
|
||||
\
|
||||
This sets the value of the main memory long word at the address provided\
|
||||
to the expression on the right side of the assignment. The least significant\
|
||||
two bits of the address are ignored.\
|
||||
\
|
||||
PHSA = <expr>\
|
||||
\
|
||||
Set the cog counter phase register A to the expression.\
|
||||
\
|
||||
PHSB = <expr>\
|
||||
\
|
||||
Set the cog counter phase register B to the expression.\
|
||||
\
|
||||
FRQA = <expr>\
|
||||
\
|
||||
Set the cog counter frequency register A to the expression.\
|
||||
\
|
||||
FRQB = <expr>\
|
||||
\
|
||||
Set the cog counter frequency register B to the expression.\
|
||||
\
|
||||
CTRA = <expr>\
|
||||
\
|
||||
Set the cog counter control register A to the expression.\
|
||||
\
|
||||
CTRB = <expr>\
|
||||
\
|
||||
Set the cog counter control register B to the expression.\
|
||||
\
|
||||
DISPLAY <expr> \{, <expr> \}\
|
||||
\
|
||||
Send the specified byte values to the display driver. The specific control\
|
||||
codes, their parameters, and their meaning depend on the display driver.\
|
||||
See the display driver documentation for descriptions.\
|
||||
\
|
||||
STOP\
|
||||
\
|
||||
Stop execution of the program.\
|
||||
\
|
||||
END\
|
||||
\
|
||||
Stop execution of the program (works like STOP).\
|
||||
\
|
||||
EEPROM [ <expr> \{, <expr>\} ] = <expr>\
|
||||
\
|
||||
This sets the value of the byte in the EEPROM attached to the boot I2C bus\
|
||||
(on pins 28-29) at the address specified. If two expressions are provided,\
|
||||
the first gives the pin number of the SCL line of the EEPROM while the\
|
||||
second expression is the address. The address may be any value from\
|
||||
zero to $7FFFF and the upper 3 bits are used to form the device select code.\
|
||||
\
|
||||
FILE = <expr>\
|
||||
\
|
||||
This sets the value of the next byte in the currently open SD card file.\
|
||||
The file must be open for writing or appending.\
|
||||
\
|
||||
SPIN [ <expr> \{, <expr> \} ]\
|
||||
\
|
||||
This causes a Spin program to be loaded into the Propeller's main memory\
|
||||
from a 32K EEPROM "page". If only one expression is provided, it is the\
|
||||
starting address in a 512K byte address space made up of one or more\
|
||||
EEPROMs attached to the I2C bus on Propeller pins 28 (SCL) and 29 (SDA).\
|
||||
The boot EEPROM is the first 32K of this address space. The lower order\
|
||||
15 bits of the address are ignored so the loading process always begins on\
|
||||
a 32K byte boundary. If two expressions are provided, the first gives the\
|
||||
pin number of the SCL line of the EEPROM while the second expression\
|
||||
gives the starting address. The address may be any value from zero to\
|
||||
$7FFFF and the upper 3 bits are used to form the device select code.\
|
||||
Once the Spin program has been successfully loaded, it begins execution.\
|
||||
The loaded Spin program completely replaces the running FemtoBasic.\
|
||||
\
|
||||
SPIN "<file>"\
|
||||
\
|
||||
This causes a Spin program to be loaded into the Propeller's main memory\
|
||||
from a specified file on an attached SD card. This file should be a copy of\
|
||||
the binary form of a Spin program as saved from the Propeller Tool.\
|
||||
Once the Spin program has been successfully loaded, it begins execution.\
|
||||
The loaded Spin program completely replaces the running FemtoBasic.\
|
||||
\
|
||||
DUMP <expr> , <expr>\
|
||||
\
|
||||
This displays a portion of the Propeller's main memory. The first expression\
|
||||
gives the starting address and the second expression gives the number\
|
||||
of bytes to be displayed. The information is formatted 8 bytes per line with\
|
||||
both hexadecimal and ASCII displayed.\
|
||||
\
|
||||
DUMP [ <expr> \{, <expr> \} ] , <expr>\
|
||||
\
|
||||
This displays a portion of the EEPROM. The last expression gives the number\
|
||||
of bytes to be displayed. The first portion describes a starting address in EEPROM.\
|
||||
See the SPIN statement for a description of the values.\
|
||||
\
|
||||
COPY [ <expr> \{, <expr>\} ] , [ <expr> \{, <expr>\}]\
|
||||
\
|
||||
This copies a Spin program from the first 32K byte EEPROM "page" specified\
|
||||
to the second. As with the SPIN statement, if only one expression is supplied,\
|
||||
it provides the starting EEPROM address. If two are supplied, the first is the\
|
||||
pin number of the SCL line while the seconds is the EEPROM address.\
|
||||
The amount of data copied is taken from the beginning of the Spin program\
|
||||
binary file.\
|
||||
\
|
||||
COPY "<file>" , [ <expr> \{, <expr>\}]\
|
||||
\
|
||||
This copies a Spin program from an SD card file to a 32K byte EEPROM "page".\
|
||||
\
|
||||
COPY [ <expr> \{, <expr>\} ] , "<file>"\
|
||||
\
|
||||
This copies a Spin program from a 32K byte EEPROM "page" to an SD card file.\
|
||||
\
|
||||
|
||||
\b \ul BOE-BOT Extensions
|
||||
\b0 \ulnone \
|
||||
\
|
||||
The BOE-BOT version of FemtoBasic is similar to the regular version\
|
||||
except that it uses a full duplex serial port for its keyboard input and\
|
||||
display output and several "pseudo-variables" and statements have\
|
||||
been added to control servos, a PING distance sensor, IR distance\
|
||||
sensors, and an HM55B compass connected via a PCA9554 I2C\
|
||||
I/O Expander. A Propeller Proto Board or equivalent is assumed.\
|
||||
\
|
||||
The left servo is connected to I/O pin 0, the right servo to pin 1, and the\
|
||||
PING bracket servo to pin 2. An IR detector is connected to pin 3 and\
|
||||
an IR LED is connected to pin 4. The PING control signal is connected\
|
||||
to pin 5. The "console" receive line is pin 6 and the transmit line is pin 7.\
|
||||
This "console" is implemented using a configured xBee transceiver.\
|
||||
A PCA9554 I2C I/O Expander is connected to the boot EEPROM bus\
|
||||
using I/O pins 28 (SCL) and 29 (SDA).\
|
||||
\
|
||||
The HM55B Ena pin is connected to PCA9554 I/O pin 0. The Clk pin\
|
||||
is connected to pin1. DI is connected to pin 2 and DO to pin 3.\
|
||||
\
|
||||
Two different binary versions are provided. One uses the programming\
|
||||
serial port for the "console" (BoeBotBasicUS.binary) and the other uses\
|
||||
pins 6 and 7 for wireless operation via an xBee transceiver\
|
||||
(BoeBotBasicXB.binary).\
|
||||
\
|
||||
|
||||
\b \ul Expressions
|
||||
\b0 \ulnone \
|
||||
\
|
||||
PING\
|
||||
\
|
||||
This value is the distance in mm of the last PING reading (one-way). It\
|
||||
will be zero if a new reading has been initiated, but a value isn't ready yet.\
|
||||
\
|
||||
IRZONE [ <expr> , <expr> , <expr> ]\
|
||||
\
|
||||
The first expression is the center frequency (in Hz). The second expression\
|
||||
is the number of zones. The third expression is the width of a zone (in Hz).\
|
||||
The IR emitter frequency is swept from the last zone to the center frequency\
|
||||
with about 200 cycles of each frequency emitted per zone. This value is the\
|
||||
number of the first zone where a response is detected (#zones-1 to 0) or -1\
|
||||
to indicate that no response was detected.\
|
||||
\
|
||||
EXPAND [ <expr> ]\
|
||||
\
|
||||
This is the value of the PCA9554 I2C I/O Expander's register whose address\
|
||||
is supplied.\
|
||||
\
|
||||
COMPASS\
|
||||
\
|
||||
This value is the compass heading in brads (0 to 359 degrees is the same\
|
||||
as 0-255).\
|
||||
\
|
||||
|
||||
\b \ul Statements
|
||||
\b0 \ulnone \
|
||||
\
|
||||
SRVLEFT \{[ <expr> ]\} = <expr>\
|
||||
SRVRIGHT \{[ <expr> ]\} = <expr>\
|
||||
SRVPING \{[ <expr> ]\} = <expr>\
|
||||
\
|
||||
Send a pulse stream to the specified servo with a width (in us) given by the\
|
||||
expression on the right side of the assignment. If a square bracketed\
|
||||
expression is provided, this is the number of pulses to send (at 20ms intervals).\
|
||||
If no pulse count is provided, the pulse train continues indefinitely. If either the\
|
||||
pulse count is zero or the pulse width is zero, the pulse train will stop. The\
|
||||
pulse width must lie between 500us and 2500us.\
|
||||
\
|
||||
PING\
|
||||
\
|
||||
Initiates a new PING cycle. The one-way path length will be zero until the new\
|
||||
reading is complete.\
|
||||
\
|
||||
COMPASS <var> , <var>\
|
||||
\
|
||||
Reads the raw x and y values of the HM55B compass and assign them to the\
|
||||
first and second variables specified respectively.\
|
||||
\
|
||||
EXPAND [ <expr> ] = <expr>\
|
||||
\
|
||||
The PCA9554 I2C I/O Expander's register whose address is supplied is set\
|
||||
to the value on the right side of the assignment.\
|
||||
\
|
||||
|
||||
\b \ul IR Buddy Extensions
|
||||
\b0 \ulnone \
|
||||
\
|
||||
The IR Buddy version of FemtoBasic is identical to the regular version\
|
||||
except that statements have been added to control one or more IR Buddy\
|
||||
devices. These may be connected to any otherwise available I/O pin.\
|
||||
\
|
||||
|
||||
\b \ul Statements
|
||||
\b0 \ulnone \
|
||||
\
|
||||
IRBSEND <expr>\
|
||||
\
|
||||
The expression is the I/O pin number to be used. This resets the IR Buddy.\
|
||||
\
|
||||
IRBSEND <expr> , <expr> \{, <expr>\}\
|
||||
\
|
||||
The first expression is the I/O pin to be used. The remaining expressions\
|
||||
are byte values to be sent to the IR Buddy (at 9600 Baud).\
|
||||
\
|
||||
IRBRECV <expr> , <expr> , <var> \{, <var>\}\
|
||||
\
|
||||
The first expression is the I/O pin to be used. The second expression is\
|
||||
an initial timeout (in ms) to use. Subsequent timeouts are 10ms. The\
|
||||
number of bytes specified are received, one in each variable. If a timeout\
|
||||
occurs, that variable and all subsequent ones are set to -1.\
|
||||
\
|
||||
|
||||
\b \ul uOLED-96-Prop Extensions
|
||||
\b0 \ulnone \
|
||||
\
|
||||
UOLED SETUP\
|
||||
\
|
||||
Initialize the uOLED-96-Prop. This must be done before any other operations are done.\
|
||||
\
|
||||
UOLED START\
|
||||
\
|
||||
Power up the screen electronics and display any data previously written to graphics RAM.\
|
||||
\
|
||||
UOLED STOP\
|
||||
\
|
||||
Power down the screen electronics without disturbing any data in graphics RAM.\
|
||||
\
|
||||
UOLED LEVEL <expr>\
|
||||
\
|
||||
Set the master contrast setting (range 0-15).\
|
||||
\
|
||||
UOLED COLOR <R> , <G> , <B>\
|
||||
\
|
||||
Set the individual color contrast values (range 0-255).\
|
||||
\
|
||||
UOLED DIM <X Up Lt> , <Y Up Lt> , <X Lo Rt> , <Y Lo Rt>\
|
||||
\
|
||||
Dim a designated screen window given the coordinates of the left upper corner and the\
|
||||
right lower corner.\
|
||||
\
|
||||
UOLED PIXEL <X> , <Y> , <R> , <G> , <B>\
|
||||
\
|
||||
Writes 2 bytes of color data to the pixel at the coordinate specified. The color information\
|
||||
range is 0-255.\
|
||||
\
|
||||
UOLED SCROLL SETUP <X> , <Y> , <Address> , <# Lines> , <Interval>\
|
||||
\
|
||||
X is he number of columns of horizontal offset. Y is the number of lines of vertical offset.\
|
||||
Address is the starting line address. # Lines is the number of lines to be scrolled\
|
||||
horizontally. Interval is the time interval between scroll steps. 0 = 6 frames, 1 = 10 frames,\
|
||||
2 = 100 frames, and 3 = 200 frames.\
|
||||
\
|
||||
UOLED SCROLL START\
|
||||
\
|
||||
Activate the scrolling function as set up previously\
|
||||
\
|
||||
UOLED SCROLL STOP\
|
||||
\
|
||||
Deactivate the scrolling function\
|
||||
\
|
||||
UOLED LINE <X Up Lt> , <Y Up Lt> , <X Lo Rt> , <Y Lo Rt> , <R> , <G> , <B>\
|
||||
\
|
||||
Display a line from the specified left upper corner to the specified right lower corner in the color\
|
||||
specified.\
|
||||
\
|
||||
UOLED RECT <X Up Lt> , <Y Up Lt> , <X Lo Rt> , <Y Lo Rt> , <R> , <G> , <B> \{, <R> , <G> , <B>\}\
|
||||
\
|
||||
Display a rectangle from the specified left upper corner to the specified right lower corner of the\
|
||||
display. The first set of color values is used for the outline color. If the second set of color values\
|
||||
is given, it's used for the fill color. If not, the outline color is used for the fill color as well.\
|
||||
\
|
||||
UOLED COPY <X Up Lt> , <Y Up Lt> , <X Lo Rt> , <Y Lo Rt> , <X Up Lt Dest> , <Y Up Lt Dest>\
|
||||
\
|
||||
Copy one area of the display screen to another. The left upper corner and the right lower corner\
|
||||
of the source area is supplied followed by the left upper corner of the destination area.\
|
||||
\
|
||||
UOLED TEXT <X> , <Y> , <R> , <G> , <B> , " ... "\
|
||||
UOLED TEXT <X> , <Y> , <R> , <G> , <B> , <expr>\
|
||||
\
|
||||
Display text using the current font starting at the coordinates provided. These are in terms of character\
|
||||
positions, not pixels (range X: 0-11/15, Y: 0-7). Wraparound occurs at the right and bottom of the display.\
|
||||
The first form displays the contents of the string while the second form displays the decimally\
|
||||
formatted value of the expression given with a leading minus sign if negative. With the 5x7 font, there\
|
||||
are 16 characters per line. With the 8x8 font, there are 12 characters per line.\
|
||||
\
|
||||
UOLED TEXT <R> , <G> , <B>\
|
||||
\
|
||||
Set the default background color for text. It's set to black during the initialization of FemtoBasic.\
|
||||
\
|
||||
UOLED TEXT <Font>\
|
||||
\
|
||||
Set the current font. 0 - 5x7 font. 1 - 8x8 font (default).\
|
||||
\
|
||||
UOLED ERASE\
|
||||
\
|
||||
Erase the screen (to black).\
|
||||
\
|
||||
UOLED RESET\
|
||||
\
|
||||
Resets the display. You must do a UOLED SETUP afterwards.\
|
||||
\
|
||||
UOLED CIRCLE <X> , <Y> , <Rad> , <R> , <G> , <B>\
|
||||
\
|
||||
Display a circle whose center is at X,Y and whose radius is Rad using the color specified. If Rad\
|
||||
is negative, the circle is filled with the color specified and the radius is the absolute value of Rad.\
|
||||
\
|
||||
UOLED CIRCLE <X> , <Y> , <Rad> , <Arc> , <R> , <G> , <B>\
|
||||
\
|
||||
Display a one eighth circle arc whose center is at X,Y and whose radius is Rad using the color\
|
||||
specified. If Rad is negative, the one eighth circle pie slice is filled with the color specified and\
|
||||
the radius is the absolute value of Rad. Arc indicates which one eighth circle is to be displayed.\
|
||||
1 - 0 to 45 degrees, 2 - 45 to 90 degrees, 3 - 90 to 135 degrees, 4 - 135 to 180 degrees.\
|
||||
\
|
||||
|
||||
\b \ul HC-OSD Extensions
|
||||
\b0 \ulnone \
|
||||
\
|
||||
The Hitt Consulting's Overlay Screen Display version uses the PS/2 keyboard for input and the\
|
||||
overlay screen driver for output. None of the commands that use SD card files are present.\
|
||||
\
|
||||
|
||||
\b \ul Expressions
|
||||
\b0 \ulnone \
|
||||
\
|
||||
SERIAL [ <timeout> ]\
|
||||
\
|
||||
The parameter is a timeout in milliseconds. This returns the character received from the 19.2Kbps\
|
||||
serial interface or a -1 if the timeout occurs.\
|
||||
\
|
||||
SERCHK [ <break> ]\
|
||||
\
|
||||
The parameter is a character. This searches the entire buffered serial input stream for the speciied\
|
||||
character and returns true (-1) if the character is present and false (0) otherwise. The serial buffer\
|
||||
is not changed.\
|
||||
\
|
||||
TIME [ <expr> ]\
|
||||
\
|
||||
If the value is between 0 and 6, this returns the binary value of the most recently read time unit\
|
||||
(0 - Seconds, 1 - Minutes, 2 - Hours, 3 - Day of Week, 4 - Day, 5 - Month, 6 - Year). If the value\
|
||||
is 7, this returns the control register value read from the DS1307. For values from 8 to 63, this\
|
||||
returns the value stored in the DS1307's RAM at that address.\
|
||||
\
|
||||
GPS [ <expr> ]\
|
||||
\
|
||||
If the value is negative, this returns the next character from the GPS serial buffer with the absolute\
|
||||
value of the expression used as a timeout in milliseconds. It returns a -1 if the timeout is exceeded.\
|
||||
If the value is positive, this returns a character from the saved GPS phrase whose index is the\
|
||||
value provided. It returns a -1 if the value is out of range or if there's no saved GPS phrase.\
|
||||
\
|
||||
|
||||
\b \ul Statements
|
||||
\b0 \ulnone \
|
||||
\
|
||||
TIME\
|
||||
\
|
||||
This reads the current time from the DS1307 into an internal buffer used by TIME [ <expr> ].\
|
||||
\
|
||||
TIME [ <address> ] = <expr>\
|
||||
\
|
||||
This writes the expression on the right side of the "=" into the control register or RAM whose address\
|
||||
is given. Addresses less than 7 or greater than 63 are not allowed.\
|
||||
\
|
||||
TIME <Sec> , <Min> , <Hrs> , <DOW> , <Day> , <Mth> , <Yr>\
|
||||
\
|
||||
This writes the time / date indicated to the appropriate locations in the DS1307 clock. The values are\
|
||||
given in binary and are translated to BCD. The BCD values are also stored in the internal buffer\
|
||||
used by TIME [ <expr> ]. The BCD values are written to the DS1307 in a single operation.\
|
||||
\
|
||||
GPS\
|
||||
\
|
||||
This starts up a background routine (in a cog) that discards any buffered GPS phrase, then begins\
|
||||
discarding any buffered serial input up to the first "$" character which begins the next GPS phrase.\
|
||||
Characters are then stored in the internal GPS phrase buffer (used by GPS [ <expr> ]) until a "*" is\
|
||||
seen. The next two characters must be hexadecimal values which are used as a checksum for the\
|
||||
phrase. If the checksum is invalid, the phrase is discarded and the routine begins searching for the\
|
||||
next phrase. If this background routine is already active, it is stopped and any saved information\
|
||||
is discarded before starting it again. Once this background routine successfully finds a complete\
|
||||
GPS phrase, it stops itself.\
|
||||
}
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,275 @@
|
|||
{\rtf1\ansi\deff0{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
|
||||
{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\lang1031\f0\fs20 char y=0, x=0 \par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
char y=0, x=1 \par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0003_3333_3300_0000\par
|
||||
LONG %%0033_3000_3330_0000\par
|
||||
LONG %%0330_0000_0033_0000\par
|
||||
LONG %%3300_0000_0003_3000\par
|
||||
LONG %%3300_0000_0000_3000\par
|
||||
LONG %%3000_0000_0000_3300\par
|
||||
LONG %%3000_0000_0000_3300\par
|
||||
LONG %%3300_0000_0000_3000\par
|
||||
LONG %%3300_0000_0003_3000\par
|
||||
LONG %%0330_0000_0033_0000\par
|
||||
LONG %%0033_3000_0333_0000\par
|
||||
LONG %%0033_3333_3330_0000\par
|
||||
LONG %%0333_0000_0333_0000\par
|
||||
char y=0, x=2 \par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
char y=0, x=3 \par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3003_3330_0333_3300\par
|
||||
LONG %%3033_3333_0333_3300\par
|
||||
LONG %%3033_3333_0333_3300\par
|
||||
char y=0, x=4 \par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%3000_3333_0000_3333\par
|
||||
LONG %%3003_3333_3000_3333\par
|
||||
LONG %%3003_3333_3000_3333\par
|
||||
LONG %%3003_3333_3000_3333\par
|
||||
LONG %%3003_3333_3000_3333\par
|
||||
LONG %%3000_3333_0000_3333\par
|
||||
LONG %%3000_0000_0000_3333\par
|
||||
LONG %%3000_0000_0000_3333\par
|
||||
char y=0, x=5 \par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%3330_0000_0000_3333\par
|
||||
LONG %%3330_0000_0000_3333\par
|
||||
LONG %%3330_0000_0000_3333\par
|
||||
LONG %%3330_0000_0000_3333\par
|
||||
LONG %%3330_0000_0000_3333\par
|
||||
LONG %%3330_0000_0000_3333\par
|
||||
LONG %%3330_0000_0000_3333\par
|
||||
LONG %%3330_0000_0000_3333\par
|
||||
char y=0, x=6 \par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%3333_3000_0000_0033\par
|
||||
LONG %%3333_3333_0000_0033\par
|
||||
LONG %%3333_3333_3000_0033\par
|
||||
LONG %%3333_3333_3300_0033\par
|
||||
LONG %%3333_3333_3330_0033\par
|
||||
LONG %%0000_3333_3330_0033\par
|
||||
LONG %%0000_0033_3333_0033\par
|
||||
LONG %%3333_0003_3333_0033\par
|
||||
char y=0, x=7 \par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
char y=1, x=0 \par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%3330_0000_0000_0000\par
|
||||
LONG %%0033_3000_0000_0000\par
|
||||
LONG %%0000_3300_0000_0000\par
|
||||
LONG %%0000_3300_0000_0000\par
|
||||
LONG %%0000_0330_0000_0000\par
|
||||
LONG %%0000_0330_0000_0000\par
|
||||
LONG %%0000_0330_0000_0000\par
|
||||
LONG %%0000_0330_0000_0000\par
|
||||
LONG %%0000_3300_0000_0000\par
|
||||
LONG %%0003_3000_0000_0000\par
|
||||
LONG %%0333_0000_0000_0000\par
|
||||
LONG %%3330_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
char y=1, x=1 \par
|
||||
LONG %%3330_0000_0033_3000\par
|
||||
LONG %%3300_0000_0003_3333\par
|
||||
LONG %%3300_0000_0003_3300\par
|
||||
LONG %%0330_0000_0033_0000\par
|
||||
LONG %%0033_0000_0030_0000\par
|
||||
LONG %%0033_0000_0330_0000\par
|
||||
LONG %%0003_3333_3330_0000\par
|
||||
LONG %%0003_3333_3330_0000\par
|
||||
LONG %%0033_0000_0330_0000\par
|
||||
LONG %%0033_0000_0030_0000\par
|
||||
LONG %%0330_0000_0033_0000\par
|
||||
LONG %%3300_0000_0003_3330\par
|
||||
LONG %%0000_0000_0000_0333\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
char y=1, x=2 \par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0033_3333\par
|
||||
LONG %%0000_0000_3330_0000\par
|
||||
LONG %%0000_0000_3300_0000\par
|
||||
LONG %%0000_0003_3000_0000\par
|
||||
LONG %%0000_0003_0000_0000\par
|
||||
LONG %%0000_0033_0000_0000\par
|
||||
LONG %%0000_0003_0000_0000\par
|
||||
LONG %%0000_0003_0000_0000\par
|
||||
LONG %%0000_0003_3000_0000\par
|
||||
LONG %%0000_0000_3300_0000\par
|
||||
LONG %%0000_0000_0333_3033\par
|
||||
LONG %%0000_0000_0003_3333\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
char y=1, x=3 \par
|
||||
LONG %%3033_3333_0333_3300\par
|
||||
LONG %%3033_3333_0333_3300\par
|
||||
LONG %%3003_3330_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%3000_0000_0333_3300\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
char y=1, x=4 \par
|
||||
LONG %%3003_3333_3000_3333\par
|
||||
LONG %%3003_3333_3000_3333\par
|
||||
LONG %%3003_3333_3000_3333\par
|
||||
LONG %%3003_3333_3000_3333\par
|
||||
LONG %%3003_3333_3000_3333\par
|
||||
LONG %%0003_3333_3000_3333\par
|
||||
LONG %%0003_3333_3000_3333\par
|
||||
LONG %%0003_3333_3000_3333\par
|
||||
LONG %%0003_3333_3000_3333\par
|
||||
LONG %%0003_3333_3000_3333\par
|
||||
LONG %%0003_3333_3000_3333\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
char y=1, x=5 \par
|
||||
LONG %%3330_0000_0000_3333\par
|
||||
LONG %%3330_0000_0000_3333\par
|
||||
LONG %%3330_0000_0000_3333\par
|
||||
LONG %%3330_0000_0003_3333\par
|
||||
LONG %%3330_0000_0003_3333\par
|
||||
LONG %%3330_0000_0033_3333\par
|
||||
LONG %%3333_3333_3333_3333\par
|
||||
LONG %%3333_3333_3333_3330\par
|
||||
LONG %%3333_3333_3333_3300\par
|
||||
LONG %%3333_3333_3333_3000\par
|
||||
LONG %%3333_3333_3330_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
char y=1, x=6 \par
|
||||
LONG %%3333_3003_3333_0033\par
|
||||
LONG %%3333_3003_3333_0033\par
|
||||
LONG %%3333_3003_3333_0033\par
|
||||
LONG %%3333_3003_3333_0033\par
|
||||
LONG %%3333_0033_3333_0033\par
|
||||
LONG %%0000_3333_3330_0033\par
|
||||
LONG %%3333_3333_3330_0033\par
|
||||
LONG %%3333_3333_3300_0033\par
|
||||
LONG %%3333_3333_3000_0033\par
|
||||
LONG %%3333_3333_0000_0033\par
|
||||
LONG %%3333_3000_0000_0033\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
char y=1, x=7 \par
|
||||
LONG %%0000_0000_0000_0003\par
|
||||
LONG %%0000_0000_0000_0003\par
|
||||
LONG %%0000_0000_0000_0003\par
|
||||
LONG %%0000_0000_0000_0003\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_3333\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
LONG %%0000_0000_0000_0000\par
|
||||
}
|
||||
|