mirror of
https://github.com/forth-ev/VolksForth.git
synced 2025-08-08 09:24:59 +00:00
Introduce new msdos target v4thi.com that uses the BIOS instead of the BDOS
for key input and therefore can run with emu2, much faster than dosbox.
This commit is contained in:
@@ -7,7 +7,7 @@ fthfiles_caseconverted = $(patsubst %.fb, %.fth, \
|
||||
$(shell ../../tools/echo-tolower.py $(fbfiles_uppercase)))
|
||||
|
||||
test: incltest.result logtest.result test-std.result test-blk.result \
|
||||
incltest-volks4th.result test-volks4th-min.result
|
||||
incltest-volks4th.result test-volks4th-min.result test-stdi.result
|
||||
|
||||
fth: $(fthfiles) $(fthfiles_caseconverted)
|
||||
|
||||
@@ -25,7 +25,7 @@ metafile.com: v4thfile.com src/meta.fb src/mk-meta.fth tests/log2file.fb
|
||||
grep -F 'Metacompiler saved as metafile.com' metafile.log
|
||||
|
||||
v4th.com: metafile.com src/meta.fb src/v4th.fth src/vf86core.fth \
|
||||
src/vf86dos.fth src/vf86file.fth src/vf86end.fth
|
||||
src/vf86dkey.fth src/vf86dos.fth src/vf86file.fth src/vf86end.fth
|
||||
rm -f v4th.com V4TH.COM OUTPUT.LOG
|
||||
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh \
|
||||
metafile.com "include v4th.fth"
|
||||
@@ -36,7 +36,8 @@ v4th.com: metafile.com src/meta.fb src/v4th.fth src/vf86core.fth \
|
||||
grep -i 'unresolved:.*[^ ]' v4th.log && exit 1 || true
|
||||
|
||||
v4thblk.com: metafile.com src/meta.fb src/v4thblk.fth src/vf86core.fth \
|
||||
src/vf86dos.fth src/vf86file.fth src/vf86bufs.fth src/vf86end.fth
|
||||
src/vf86dkey.fth src/vf86dos.fth src/vf86file.fth src/vf86bufs.fth \
|
||||
src/vf86end.fth
|
||||
rm -f v4thblk.com V4THBLK.COM OUTPUT.LOG
|
||||
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh \
|
||||
metafile.com "include v4thblk.fth"
|
||||
@@ -46,6 +47,17 @@ v4thblk.com: metafile.com src/meta.fb src/v4thblk.fth src/vf86core.fth \
|
||||
grep -F 'new kernel written as v4thblk.com' v4thblk.log
|
||||
grep -i 'unresolved:.*[^ ]' v4thblk.log && exit 1 || true
|
||||
|
||||
v4thi.com: metafile.com src/meta.fb src/v4thi.fth src/vf86core.fth \
|
||||
src/vf86ikey.fth src/vf86dos.fth src/vf86file.fth src/vf86end.fth
|
||||
rm -f v4th.com V4TH.COM OUTPUT.LOG
|
||||
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh \
|
||||
metafile.com "include v4thi.fth"
|
||||
dos2unix -n OUTPUT.LOG v4thi.log
|
||||
mv V4THI.COM v4thi.com
|
||||
grep -F 'unresolved:' v4thi.log
|
||||
grep -F 'new kernel written as v4thi.com' v4thi.log
|
||||
grep -i 'unresolved:.*[^ ]' v4thi.log && exit 1 || true
|
||||
|
||||
# o4th for old volks4th - the new v4th is built with precompiled
|
||||
# metacompiler metafile.com and mk-v4th.fth which writes a compile log.
|
||||
o4th.com o4th.log: volks4th.com src/kernel.fb
|
||||
@@ -100,6 +112,14 @@ test-blk.log: \
|
||||
"include logprep.fth include test-blk.fth")
|
||||
dos2unix -n dosfiles/OUTPUT.LOG $@
|
||||
|
||||
test-stdi.log: \
|
||||
$(patsubst %, dosfiles/%, v4thi.com $(prepfths)) \
|
||||
$(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*))
|
||||
rm -f dosfiles/OUTPUT.LOG
|
||||
(cd dosfiles && ../emulator/run-in-dosbox.sh v4thi.com \
|
||||
"include logprep.fth include test-std.fth")
|
||||
dos2unix -n dosfiles/OUTPUT.LOG $@
|
||||
|
||||
forthblkdos: v4thblk.dos v4thblk.forth
|
||||
|
||||
forthdos: forthblkdos v4thfile.dos v4thfile.forth v4th0.dos v4th0.forth
|
||||
@@ -190,6 +210,10 @@ test-volks4th-min.golden: $(patsubst %, tests/golden/%.golden, \
|
||||
volks4th-prelim core)
|
||||
cat $^ > $@
|
||||
|
||||
test-stdi.golden: $(patsubst %, tests/golden/%.golden, \
|
||||
prelim core coreplus coreext doubltst report-noblk)
|
||||
cat $^ > $@
|
||||
|
||||
|
||||
%.golden: tests/golden/%.golden
|
||||
cp -p $< $@
|
||||
|
@@ -19,6 +19,7 @@
|
||||
new v4th.com Onlyforth Target definitions
|
||||
|
||||
include vf86core.fth
|
||||
include vf86dkey.fth
|
||||
include vf86dos.fth
|
||||
include vf86file.fth
|
||||
include vf86end.fth
|
||||
|
@@ -19,6 +19,7 @@
|
||||
new v4thblk.com Onlyforth Target definitions
|
||||
|
||||
include vf86core.fth
|
||||
include vf86dkey.fth
|
||||
include vf86dos.fth
|
||||
include vf86file.fth
|
||||
include vf86bufs.fth
|
||||
|
33
8086/msdos/src/v4thi.fth
Normal file
33
8086/msdos/src/v4thi.fth
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
\ with build log:
|
||||
' noop alias \log
|
||||
\ without build log:
|
||||
\ ' \ alias \log
|
||||
|
||||
\log logopen output.log
|
||||
|
||||
\ : .blk|tib
|
||||
\ blk @ ?dup IF ." Blk " u. ?cr exit THEN
|
||||
\ incfile @ IF tib #tib @ cr type THEN ;
|
||||
|
||||
\ ' .blk|tib Is .status
|
||||
|
||||
Onlyforth
|
||||
|
||||
2 loadfrom META.fb
|
||||
|
||||
new v4thi.com Onlyforth Target definitions
|
||||
|
||||
include vf86core.fth
|
||||
include vf86ikey.fth
|
||||
include vf86dos.fth
|
||||
include vf86file.fth
|
||||
include vf86end.fth
|
||||
|
||||
\log logclose
|
||||
flush
|
||||
\log logreopen
|
||||
|
||||
cr .( new kernel written as v4thi.com) cr
|
||||
|
||||
\log logclose
|
60
8086/msdos/src/vf86dkey.fth
Normal file
60
8086/msdos/src/vf86dkey.fth
Normal file
@@ -0,0 +1,60 @@
|
||||
|
||||
Forth definitions
|
||||
|
||||
\ *** Block No. 114, Hexblock 72
|
||||
|
||||
\ BDOS keyboard input ks 16 sep 88
|
||||
\ es muss wirklich so kompliziert sein, da sonst kein ^C und ^P
|
||||
|
||||
| Variable newkey newkey off
|
||||
|
||||
Code (key@ ( -- 8b ) D push newkey #) D mov D+ D+ or
|
||||
0= ?[ $7 # A+ mov $21 int A- D- mov ]?
|
||||
0 # D+ mov D+ newkey 1+ #) mov Next
|
||||
end-code
|
||||
|
||||
Code (key? ( -- f ) D push newkey #) D mov D+ D+ or
|
||||
0= ?[ -1 # D- mov 6 # A+ mov $21 int 0=
|
||||
?[ 0 # D+ mov
|
||||
][ -1 # A+ mov A newkey #) mov -1 # D+ mov
|
||||
]? ]? D+ D- mov Next
|
||||
end-code
|
||||
|
||||
\ *** Block No. 115, Hexblock 73
|
||||
|
||||
\ empty-keys (key ks 16 sep 88
|
||||
|
||||
Code empty-keys $C00 # A mov $21 int
|
||||
0 # newkey 1+ #) byte mov Next end-code
|
||||
|
||||
: (key ( -- 16b ) BEGIN pause (key? UNTIL
|
||||
(key@ ?dup ?exit (key? IF (key@ negate exit THEN 0 ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\ *** Block No. 116, Hexblock 74
|
||||
|
||||
\ BIOS keyboard input ks 16 sep 88
|
||||
|
||||
\ Code (key@ ( -- 8b ) D push A+ A+ xor $16 int
|
||||
\ A- D- xchg 0 # D+ mov Next end-code
|
||||
|
||||
\ Code (key? ( -- f ) D push 1 # A+ mov D D xor
|
||||
\ $16 int 0= not ?[ D dec ]? Next end-code
|
||||
|
||||
\ Code empty-keys $C00 # A mov $21 int Next end-code
|
||||
|
||||
\ : (key ( -- 8b ) BEGIN pause (key? UNTIL (key@ ;
|
||||
|
||||
\ mit diesen Keytreibern sind die Funktionstasten nicht
|
||||
\ mehr durch ANSI.SYS Sequenzen vorbelegt.
|
||||
|
||||
|
||||
|
@@ -62,29 +62,29 @@
|
||||
\ BDOS keyboard input ks 16 sep 88
|
||||
\ es muss wirklich so kompliziert sein, da sonst kein ^C und ^P
|
||||
|
||||
| Variable newkey newkey off
|
||||
\ | Variable newkey newkey off
|
||||
|
||||
Code (key@ ( -- 8b ) D push newkey #) D mov D+ D+ or
|
||||
0= ?[ $7 # A+ mov $21 int A- D- mov ]?
|
||||
0 # D+ mov D+ newkey 1+ #) mov Next
|
||||
end-code
|
||||
\ Code (key@ ( -- 8b ) D push newkey #) D mov D+ D+ or
|
||||
\ 0= ?[ $7 # A+ mov $21 int A- D- mov ]?
|
||||
\ 0 # D+ mov D+ newkey 1+ #) mov Next
|
||||
\ end-code
|
||||
|
||||
Code (key? ( -- f ) D push newkey #) D mov D+ D+ or
|
||||
0= ?[ -1 # D- mov 6 # A+ mov $21 int 0=
|
||||
?[ 0 # D+ mov
|
||||
][ -1 # A+ mov A newkey #) mov -1 # D+ mov
|
||||
]? ]? D+ D- mov Next
|
||||
end-code
|
||||
\ Code (key? ( -- f ) D push newkey #) D mov D+ D+ or
|
||||
\ 0= ?[ -1 # D- mov 6 # A+ mov $21 int 0=
|
||||
\ ?[ 0 # D+ mov
|
||||
\ ][ -1 # A+ mov A newkey #) mov -1 # D+ mov
|
||||
\ ]? ]? D+ D- mov Next
|
||||
\ end-code
|
||||
|
||||
\ *** Block No. 115, Hexblock 73
|
||||
|
||||
\ empty-keys (key ks 16 sep 88
|
||||
|
||||
Code empty-keys $C00 # A mov $21 int
|
||||
0 # newkey 1+ #) byte mov Next end-code
|
||||
\ Code empty-keys $C00 # A mov $21 int
|
||||
\ 0 # newkey 1+ #) byte mov Next end-code
|
||||
|
||||
: (key ( -- 16b ) BEGIN pause (key? UNTIL
|
||||
(key@ ?dup ?exit (key? IF (key@ negate exit THEN 0 ;
|
||||
\ : (key ( -- 16b ) BEGIN pause (key? UNTIL
|
||||
\ (key@ ?dup ?exit (key? IF (key@ negate exit THEN 0 ;
|
||||
|
||||
|
||||
|
||||
|
60
8086/msdos/src/vf86ikey.fth
Normal file
60
8086/msdos/src/vf86ikey.fth
Normal file
@@ -0,0 +1,60 @@
|
||||
|
||||
Forth definitions
|
||||
|
||||
\ *** Block No. 114, Hexblock 72
|
||||
|
||||
\ BDOS keyboard input ks 16 sep 88
|
||||
\ es muss wirklich so kompliziert sein, da sonst kein ^C und ^P
|
||||
|
||||
\ | Variable newkey newkey off
|
||||
|
||||
\ Code (key@ ( -- 8b ) D push newkey #) D mov D+ D+ or
|
||||
\ 0= ?[ $7 # A+ mov $21 int A- D- mov ]?
|
||||
\ 0 # D+ mov D+ newkey 1+ #) mov Next
|
||||
\ end-code
|
||||
|
||||
\ Code (key? ( -- f ) D push newkey #) D mov D+ D+ or
|
||||
\ 0= ?[ -1 # D- mov 6 # A+ mov $21 int 0=
|
||||
\ ?[ 0 # D+ mov
|
||||
\ ][ -1 # A+ mov A newkey #) mov -1 # D+ mov
|
||||
\ ]? ]? D+ D- mov Next
|
||||
\ end-code
|
||||
|
||||
\ *** Block No. 115, Hexblock 73
|
||||
|
||||
\ empty-keys (key ks 16 sep 88
|
||||
|
||||
\ Code empty-keys $C00 # A mov $21 int
|
||||
\ 0 # newkey 1+ #) byte mov Next end-code
|
||||
|
||||
\ : (key ( -- 16b ) BEGIN pause (key? UNTIL
|
||||
\ (key@ ?dup ?exit (key? IF (key@ negate exit THEN 0 ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\ *** Block No. 116, Hexblock 74
|
||||
|
||||
\ BIOS keyboard input ks 16 sep 88
|
||||
|
||||
Code (key@ ( -- 8b ) D push A+ A+ xor $16 int
|
||||
A- D- xchg 0 # D+ mov Next end-code
|
||||
|
||||
Code (key? ( -- f ) D push 1 # A+ mov D D xor
|
||||
$16 int 0= not ?[ D dec ]? Next end-code
|
||||
|
||||
Code empty-keys $C00 # A mov $21 int Next end-code
|
||||
|
||||
: (key ( -- 8b ) BEGIN pause (key? UNTIL (key@ ;
|
||||
|
||||
\ mit diesen Keytreibern sind die Funktionstasten nicht
|
||||
\ mehr durch ANSI.SYS Sequenzen vorbelegt.
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user