Update c64/c16 volksForth with the fixes from ultraForth 3.82

This commit is contained in:
Philip Zembrod 2020-07-19 23:42:04 +02:00
parent a85073aad5
commit ed78b0e64d
14 changed files with 22 additions and 27 deletions

View File

@ -34,18 +34,6 @@ debug-64: emulator/tcbase.T64 emulator/build-vf.sh \
disks/vforth4_2.d64 disks/tc38q.d64 $(vf_fth_files_petscii)
emulator/build-vf.sh vf-c64-main.fth
# Temporary bincmp target while the old and the new binaries are still
# expected to be binary identical.
# Note: There is now 1 byte difference between the
# old c64/c16-volksforth83 and the new c64/c16-vf-reference:
# Byte $1b64 changed from $7c (old) to $dc (new).
# This corresponds to the ." |" string in .name (blk/page $4e).
# Since both represent the same character in PETSCII, namely | ,
# the difference is acceptable, and a new reference binary was set.
bincmp: cbmfiles/c64-vf-latest cbmfiles/c16-vf-latest
cmp -b -l cbmfiles/c64-vf-latest tests/c64-vf-reference
cmp -b -l cbmfiles/c16-vf-latest tests/c16-vf-reference
run-devenv: emulator/devenv.T64
emulator/run-in-vice.sh devenv
@ -58,7 +46,7 @@ run-testbase16: emulator/testbase16.T64
# Targetcompiler targets
cbmfiles/tcbase: emulator/c64-volksforth83.T64 emulator/build-tcbase.sh \
cbmfiles/tcbase: emulator/c64-vf-390.T64 emulator/build-tcbase.sh \
disks/tc38q.d64 disks/file-words.d64 cbmfiles/tc-base.fth
emulator/build-tcbase.sh

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -281,17 +281,17 @@
\ *** Block No. 10, Hexblock a
\ include loadscreen 30jun20pz
\ include loadscreen 19jul20pz
: i/o-status? $90 c@ ;
\ : i/o-status? $90 c@ ;
: dos-error ( dev -- )
15 busin
BEGIN bus@ con! i/o-status? UNTIL
busoff ;
: unloop r> rdrop rdrop rdrop >r ;
\ : unloop r> rdrop rdrop rdrop >r ;
: lo/hi> ( lo hi -- u )
255 and 256 * swap 255 and + ;

View File

@ -14,4 +14,4 @@ keybuf="3 drive 20 load\n3 drive 10 load\nsave\n\
savesystem tcbase\ndos s0:notdone\n"
DISK10=tc38q DISK11=file-words "${emulatordir}/run-in-vice.sh" \
"c64-volksforth83" "${keybuf}"
"c64-vf-390" "${keybuf}"

View File

@ -511,7 +511,7 @@ Code 2+ ( n1 -- n2)
2 # lda n+ bne end-code
Code 3+ ( n1 -- n2)
3 # lda n+ bne end-code
| Code 4+ ( n1 -- n2)
Code 4+ ( n1 -- n2)
4 # lda n+ bne end-code
| Code 6+ ( n1 -- n2)
6 # lda n+ bne end-code
@ -911,6 +911,9 @@ Code case?
: LEAVE endloop r> 2- dup @ + >r ;
restrict
code UNLOOP clc rp lda 6 # adc rp sta
cs ?[ rp 1+ inc ]? Next jmp end-code
\ Returnstack: calladr | index
\ limit | adr of DO
@ -2702,7 +2705,7 @@ E400 Constant limit Variable first
name> under 1+ u< swap heap? or ;
| : endpoints ( addr -- addr symb)
heap voc-link @ >r
heap voc-link >r
BEGIN r> @ ?dup \ through all Vocabs
WHILE dup >r 4 - >r \ link on returnst.
BEGIN r> @ >r over 1- dup r@ u<

View File

@ -13,9 +13,10 @@ Forth also definitions
(C16 : (64 ) \ jumps belhind C)
(C64 : (16 )
BEGIN name count 0= abort" C) missing"
BEGIN name count dup 0=
abort" C) missing" 2 = >r
@ [ Ascii C Ascii ) $100 * + ] Literal
= UNTIL ; immediate
= r> and UNTIL ; immediate
: C) ; immediate

View File

@ -12,7 +12,7 @@ include vf-lbls-cbm.fth
098 >label InDev
0ff19 >label BrdCol
0ff15 >label BkgCol
0540 >label PenCol
053b >label PenCol
09d >label PrgEnd
0b2 >label IOBeg
0cb >label CurFlg

View File

@ -217,10 +217,13 @@ Code bus@ ( -- 8b)
: businput ( adr n --)
bounds ?DO bus@ I c! LOOP pause ;
: i/o-status? $90 c@ ;
: derror? ( -- flag )
disk $F busin bus@ dup Ascii 0 -
IF BEGIN emit bus@ dup #cr = UNTIL
0= cr THEN 0= busoff ;
IF BEGIN emit bus@ dup #cr = UNTIL
0= cr ELSE BEGIN bus@ #cr = UNTIL
THEN 0= busoff ;
\ *** Block No. 140, Hexblock 8c
@ -306,13 +309,13 @@ Code bus@ ( -- 8b)
: index ( from to --)
1+ swap DO
cr I 2 .r I block 1+ 25 type
cr I 3 .r I block 28 type
stop? IF LEAVE THEN LOOP ;
: findex ( from to --)
diskopen IF 2drop exit THEN
1+ swap DO cr I 2 .r
1+ swap DO cr I 3 .r
pad dup I 2* 2* s#>t+s readsector
>r 1+ 25 type
>r 28 type
r> stop? or IF LEAVE THEN
LOOP diskclose ;

Binary file not shown.

Binary file not shown.