From 081ed82c25501d482398155b704d7f247bdc0f74 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Mon, 31 Jan 2022 07:21:14 +0100 Subject: [PATCH] Run incltest.fth on new-built minimal v4th.com --- 8086/msdos/Makefile | 40 ++++++++++++++++++++++++++--------- 8086/msdos/multi.vid | 2 +- 8086/msdos/tests/incltest.fth | 1 + 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/8086/msdos/Makefile b/8086/msdos/Makefile index b82e4ef..5e5c104 100644 --- a/8086/msdos/Makefile +++ b/8086/msdos/Makefile @@ -7,7 +7,7 @@ fthfiles_caseconverted = $(patsubst %.fb, %.fth, \ $(shell ../../tools/echo-tolower.py $(fbfiles_uppercase))) test: incltest.result logtest.result test-min.result \ - test-volks4th-min.result + incltest-volks4th.result test-volks4th-min.result fth: $(fthfiles) $(fthfiles_caseconverted) @@ -36,7 +36,26 @@ logtest.log: volks4th.com tests/log2file.fb tests/logtest.fb FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh volks4th.com "include logtest.fb" dos2unix -n OUTPUT.LOG $@ -incltest.log: v4thfile.com tests/log2file.fb tests/incltest.fth +prepsrcs = asm.fb extend.fb multi.vid dos.fb include.fb + +incltest.log: \ + $(patsubst %, dosfiles/%, v4th.com $(prepsrcs) log2file.fb \ + incltest.fth) + rm -f dosfiles/OUTPUT.LOG + (cd dosfiles && ../emulator/run-in-dosbox.sh \ + v4th.com "include include.fb include incltest.fth") + dos2unix -n dosfiles/OUTPUT.LOG $@ + +test-min.log: \ + $(patsubst %, dosfiles/%, v4th.com $(prepsrcs)) \ + $(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*)) + rm -f dosfiles/OUTPUT.LOG + (cd dosfiles && ../emulator/run-in-dosbox.sh v4th.com \ + "include testprep.fb include test-min.fth") + dos2unix -n dosfiles/OUTPUT.LOG $@ + + +incltest-volks4th.log: v4thfile.com tests/log2file.fb tests/incltest.fth rm -f OUTPUT.LOG FORTHPATH="f:\\;f:\\tests" ./emulator/run-in-dosbox.sh \ v4thfile.com "include incltest.fth" @@ -44,16 +63,14 @@ incltest.log: v4thfile.com tests/log2file.fb tests/incltest.fth test-volks4th-min.log: v4thfile.com tests/* emulator/run-in-dosbox.sh rm -f OUTPUT.LOG - FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh v4thfile.com "include test-min.fth" + FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh \ + v4thfile.com "include test-min.fth" dos2unix -n OUTPUT.LOG $@ -test-min.log: dosfiles/v4th.com dosfiles/asm.fb dosfiles/extend.fb \ - dosfiles/multi.vid dosfiles/dos.fb dosfiles/include.fb \ - $(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*)) - rm -f dosfiles/OUTPUT.LOG - (cd dosfiles && ../emulator/run-in-dosbox.sh v4th.com \ - "include testprep.fb include test-min.fth") - dos2unix -n dosfiles/OUTPUT.LOG $@ + +run-editor: volks4th.com emulator/run-in-dosbox.sh + FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh volks4th.com + test-min.golden: $(patsubst %, tests/golden/%.golden, prelim core) cat $? > $@ @@ -70,6 +87,9 @@ test-volks4th-min.golden: $(patsubst %, tests/golden/%.golden, \ %.golden: tests/golden/%.golden cp -p $< $@ +%-volks4th.golden: tests/golden/%.golden + cp -p $< $@ + %.result: %.log %.golden tests/evaluate-test.sh rm -f $@ tests/evaluate-test.sh $(basename $@) diff --git a/8086/msdos/multi.vid b/8086/msdos/multi.vid index 00988ce..827af07 100644 --- a/8086/msdos/multi.vid +++ b/8086/msdos/multi.vid @@ -1 +1 @@ - This display interface uses BIOS call $10 functions for a fast display interface. A couple of state variables is contained in a vector that is task specific such that different tasks may use different windows. For simplicity windows always span the whole width of the screen. They can be defined by top and bottom line. This mechanism is used for a convenient status display line on the bottom of the screen. \ Multitsking display interface loadscreen ks cas 10nov05 Onlyforth \needs Assembler 2 loadfrom asm.scr User area area off \ points at active window Variable status \ to switch status on/off | Variable cursor \ points at area with active cursor 1 8 +thru .( Multitasking display driver loaded ) cr \ Multitsking display interface ks 6 sep 86 : Area: Create 0 , 0 , 7 c, Does> area ! ; \ | col | row | top | bot | att | Area: terminal terminal area @ cursor ! : (area Create dup c, 1+ Does> c@ area @ + ; 0 | (area ccol | (area crow | (area ctop | (area cbot (area catt drop : window ( topline botline -- ) cbot c! ctop c! ; : full 0 c/col 2- window ; full \ Multitask (type (emit ks 20 dez 87 Code (type ( addr len -- ) W pop I push R push u' area U D) I mov U push D U mov $F # A+ mov $10 int u' catt I D) R- mov 3 # A+ mov $10 int C push D push $E0E # C mov 1 # A+ mov $10 int I ) D mov 1 # C mov U inc [[ U dec 0= not ?[[ 2 # A+ mov $10 int D- inc ' c/row >body #) D- cmp 0= not ?[[ W ) A- mov W inc 9 # A+ mov $10 int ]]? ]? D I ) mov D pop cursor #) I cmp 0= ?[ I ) D mov ]? 2 # A+ mov $10 int C pop 1 # A+ mov $10 int U pop R pop I pop D pop ' pause #) jmp end-code : (emit ( char -- ) sp@ 1 (type drop ; \ Multitask (at (at? ks 04 aug 87 Code (at ( row col -- ) A pop A- D+ mov u' area U D) W mov D W ) mov cursor #) W cmp 0= ?[ R push U push $F # A+ mov $10 int 2 # A+ mov $10 int U pop R pop ]? D pop Next end-code Code (at? ( -- row col ) D push u' area U D) W mov W ) D mov D+ A- mov 0 # A+ mov A+ D+ mov A push Next end-code Code curat? ( -- row col ) D push R push $F # A+ mov $10 int 3 # A+ mov $10 int R pop 0 # A mov D+ A- xchg A push Next end-code \ cur! curshape setpage ks 28 jun 87 : cur! \ set cursor into current task's window area @ cursor ! (at? (at ; cur! Code curshape ( top bot -- ) D C mov D pop D- C+ mov 1 # A+ mov $10 int D pop Next end-code Code setpage ( n -- ) $503 # A mov D- A- and $10 int D pop Next end-code \ Multitask normal invers blankline ks 01 nov 88 : normal 7 catt c! ; : invers $70 catt c! ; : underline 1 catt c! ; : bright $F catt c! ; Code blankline D push R push U push $F # A+ mov $10 int u' area U D) W mov u' catt W D) R- mov 3 # A+ mov $10 int C push D push $E0E # C mov 1 # A+ mov $10 int W ) D mov 2 # A+ mov $10 int ' c/row >body #) C mov D- C- sub bl # A- mov 9 # A+ mov C- C- or 0= not ?[ $10 int ]? D pop 2 # A+ mov $10 int \ set cursor back C pop 1 # A+ mov $10 int \ cursor visible again U pop R pop D pop ' pause #) jmp end-code | : lineerase ( line# -- ) 0 (at blankline ; \ Multitask (del scroll (cr (page ks 04 okt 87 : (del (at? ?dup IF 1- 2dup (at bl (emit (at exit THEN drop ; Code scroll D push R push U push u' area U D) W mov u' catt W D) R+ mov u' ctop W D) D mov D- C+ mov 0 # C- mov ' c/row >body #) D- mov D- dec $601 # A mov $10 int U pop R pop D pop Next end-code : (cr (at? drop 1+ dup cbot c@ u> IF scroll drop cbot c@ THEN lineerase ; : (page ctop c@ cbot c@ DO I lineerase -1 +LOOP ; \ Multitask status display ks 10 okt 87 ' (emit ' display 2 + ! ' (cr ' display 4 + ! ' (type ' display 6 + ! ' (del ' display 8 + ! ' (page ' display &10 + ! ' (at ' display &12 + ! ' (at? ' display &14 + ! : .base base @ decimal dup 2 .r base ! ; : .sp ( n -- ) ." s" depth swap 1+ - 2 .r ; : (.drv ( n -- ) Ascii A + emit ." : " ; : .dr ." " drv (.drv ; : .scr blk @ IF ." Blk" blk ELSE ." Scr" scr THEN @ 5 .r ; : .space ." Dic" s0 @ here $100 + - 6 u.r ; \ statuszeile ks ks 04 aug 87 | : fstat ( n -- ) .base .sp .space .scr .dr file? 2 spaces order ; | Area: statusline statusline c/col 1- dup window page invers terminal : (.status output @ display area @ statusline status @ IF (at? drop 0 (at 2 fstat blankline ELSE normal page invers THEN area ! output ! ; ' (.status Is .status : bye status off .status bye ; \ No newline at end of file + This display interface uses BIOS call $10 functions for a fast display interface. A couple of state variables is contained in a vector that is task specific such that different tasks may use different windows. For simplicity windows always span the whole width of the screen. They can be defined by top and bottom line. This mechanism is used for a convenient status display line on the bottom of the screen. \ Multitsking display interface loadscreen ks phz 31jan22 Onlyforth \needs Assembler 2 loadfrom asm.fb User area area off \ points at active window Variable status \ to switch status on/off | Variable cursor \ points at area with active cursor 1 8 +thru .( Multitasking display driver loaded ) cr \ Multitsking display interface ks 6 sep 86 : Area: Create 0 , 0 , 7 c, Does> area ! ; \ | col | row | top | bot | att | Area: terminal terminal area @ cursor ! : (area Create dup c, 1+ Does> c@ area @ + ; 0 | (area ccol | (area crow | (area ctop | (area cbot (area catt drop : window ( topline botline -- ) cbot c! ctop c! ; : full 0 c/col 2- window ; full \ Multitask (type (emit ks 20 dez 87 Code (type ( addr len -- ) W pop I push R push u' area U D) I mov U push D U mov $F # A+ mov $10 int u' catt I D) R- mov 3 # A+ mov $10 int C push D push $E0E # C mov 1 # A+ mov $10 int I ) D mov 1 # C mov U inc [[ U dec 0= not ?[[ 2 # A+ mov $10 int D- inc ' c/row >body #) D- cmp 0= not ?[[ W ) A- mov W inc 9 # A+ mov $10 int ]]? ]? D I ) mov D pop cursor #) I cmp 0= ?[ I ) D mov ]? 2 # A+ mov $10 int C pop 1 # A+ mov $10 int U pop R pop I pop D pop ' pause #) jmp end-code : (emit ( char -- ) sp@ 1 (type drop ; \ Multitask (at (at? ks 04 aug 87 Code (at ( row col -- ) A pop A- D+ mov u' area U D) W mov D W ) mov cursor #) W cmp 0= ?[ R push U push $F # A+ mov $10 int 2 # A+ mov $10 int U pop R pop ]? D pop Next end-code Code (at? ( -- row col ) D push u' area U D) W mov W ) D mov D+ A- mov 0 # A+ mov A+ D+ mov A push Next end-code Code curat? ( -- row col ) D push R push $F # A+ mov $10 int 3 # A+ mov $10 int R pop 0 # A mov D+ A- xchg A push Next end-code \ cur! curshape setpage ks 28 jun 87 : cur! \ set cursor into current task's window area @ cursor ! (at? (at ; cur! Code curshape ( top bot -- ) D C mov D pop D- C+ mov 1 # A+ mov $10 int D pop Next end-code Code setpage ( n -- ) $503 # A mov D- A- and $10 int D pop Next end-code \ Multitask normal invers blankline ks 01 nov 88 : normal 7 catt c! ; : invers $70 catt c! ; : underline 1 catt c! ; : bright $F catt c! ; Code blankline D push R push U push $F # A+ mov $10 int u' area U D) W mov u' catt W D) R- mov 3 # A+ mov $10 int C push D push $E0E # C mov 1 # A+ mov $10 int W ) D mov 2 # A+ mov $10 int ' c/row >body #) C mov D- C- sub bl # A- mov 9 # A+ mov C- C- or 0= not ?[ $10 int ]? D pop 2 # A+ mov $10 int \ set cursor back C pop 1 # A+ mov $10 int \ cursor visible again U pop R pop D pop ' pause #) jmp end-code | : lineerase ( line# -- ) 0 (at blankline ; \ Multitask (del scroll (cr (page ks 04 okt 87 : (del (at? ?dup IF 1- 2dup (at bl (emit (at exit THEN drop ; Code scroll D push R push U push u' area U D) W mov u' catt W D) R+ mov u' ctop W D) D mov D- C+ mov 0 # C- mov ' c/row >body #) D- mov D- dec $601 # A mov $10 int U pop R pop D pop Next end-code : (cr (at? drop 1+ dup cbot c@ u> IF scroll drop cbot c@ THEN lineerase ; : (page ctop c@ cbot c@ DO I lineerase -1 +LOOP ; \ Multitask status display ks 10 okt 87 ' (emit ' display 2 + ! ' (cr ' display 4 + ! ' (type ' display 6 + ! ' (del ' display 8 + ! ' (page ' display &10 + ! ' (at ' display &12 + ! ' (at? ' display &14 + ! : .base base @ decimal dup 2 .r base ! ; : .sp ( n -- ) ." s" depth swap 1+ - 2 .r ; : (.drv ( n -- ) Ascii A + emit ." : " ; : .dr ." " drv (.drv ; : .scr blk @ IF ." Blk" blk ELSE ." Scr" scr THEN @ 5 .r ; : .space ." Dic" s0 @ here $100 + - 6 u.r ; \ statuszeile ks ks 04 aug 87 | : fstat ( n -- ) .base .sp .space .scr .dr file? 2 spaces order ; | Area: statusline statusline c/col 1- dup window page invers terminal : (.status output @ display area @ statusline status @ IF (at? drop 0 (at 2 fstat blankline ELSE normal page invers THEN area ! output ! ; ' (.status Is .status : bye status off .status bye ; \ No newline at end of file diff --git a/8086/msdos/tests/incltest.fth b/8086/msdos/tests/incltest.fth index 2a0dd94..02da693 100644 --- a/8086/msdos/tests/incltest.fth +++ b/8086/msdos/tests/incltest.fth @@ -1,4 +1,5 @@ +\needs (type include extend.fb include multi.vid include dos.fb include log2file.fb logopen output.log