mirror of
https://github.com/forth-ev/VolksForth.git
synced 2025-01-09 13:32:05 +00:00
Update c64/c16 volksForth with the fixes from ultraForth 3.82
This commit is contained in:
parent
a85073aad5
commit
ed78b0e64d
@ -34,18 +34,6 @@ debug-64: emulator/tcbase.T64 emulator/build-vf.sh \
|
|||||||
disks/vforth4_2.d64 disks/tc38q.d64 $(vf_fth_files_petscii)
|
disks/vforth4_2.d64 disks/tc38q.d64 $(vf_fth_files_petscii)
|
||||||
emulator/build-vf.sh vf-c64-main.fth
|
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
|
run-devenv: emulator/devenv.T64
|
||||||
emulator/run-in-vice.sh devenv
|
emulator/run-in-vice.sh devenv
|
||||||
|
|
||||||
@ -58,7 +46,7 @@ run-testbase16: emulator/testbase16.T64
|
|||||||
|
|
||||||
# Targetcompiler targets
|
# 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
|
disks/tc38q.d64 disks/file-words.d64 cbmfiles/tc-base.fth
|
||||||
emulator/build-tcbase.sh
|
emulator/build-tcbase.sh
|
||||||
|
|
||||||
|
Binary file not shown.
BIN
6502/C64/cbmfiles/c64-vf-390
Normal file
BIN
6502/C64/cbmfiles/c64-vf-390
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -281,17 +281,17 @@
|
|||||||
|
|
||||||
\ *** Block No. 10, Hexblock a
|
\ *** Block No. 10, Hexblock a
|
||||||
|
|
||||||
\ include loadscreen 30jun20pz
|
\ include loadscreen 19jul20pz
|
||||||
|
|
||||||
|
|
||||||
: i/o-status? $90 c@ ;
|
\ : i/o-status? $90 c@ ;
|
||||||
|
|
||||||
: dos-error ( dev -- )
|
: dos-error ( dev -- )
|
||||||
15 busin
|
15 busin
|
||||||
BEGIN bus@ con! i/o-status? UNTIL
|
BEGIN bus@ con! i/o-status? UNTIL
|
||||||
busoff ;
|
busoff ;
|
||||||
|
|
||||||
: unloop r> rdrop rdrop rdrop >r ;
|
\ : unloop r> rdrop rdrop rdrop >r ;
|
||||||
|
|
||||||
: lo/hi> ( lo hi -- u )
|
: lo/hi> ( lo hi -- u )
|
||||||
255 and 256 * swap 255 and + ;
|
255 and 256 * swap 255 and + ;
|
||||||
|
@ -14,4 +14,4 @@ keybuf="3 drive 20 load\n3 drive 10 load\nsave\n\
|
|||||||
savesystem tcbase\ndos s0:notdone\n"
|
savesystem tcbase\ndos s0:notdone\n"
|
||||||
|
|
||||||
DISK10=tc38q DISK11=file-words "${emulatordir}/run-in-vice.sh" \
|
DISK10=tc38q DISK11=file-words "${emulatordir}/run-in-vice.sh" \
|
||||||
"c64-volksforth83" "${keybuf}"
|
"c64-vf-390" "${keybuf}"
|
||||||
|
@ -511,7 +511,7 @@ Code 2+ ( n1 -- n2)
|
|||||||
2 # lda n+ bne end-code
|
2 # lda n+ bne end-code
|
||||||
Code 3+ ( n1 -- n2)
|
Code 3+ ( n1 -- n2)
|
||||||
3 # lda n+ bne end-code
|
3 # lda n+ bne end-code
|
||||||
| Code 4+ ( n1 -- n2)
|
Code 4+ ( n1 -- n2)
|
||||||
4 # lda n+ bne end-code
|
4 # lda n+ bne end-code
|
||||||
| Code 6+ ( n1 -- n2)
|
| Code 6+ ( n1 -- n2)
|
||||||
6 # lda n+ bne end-code
|
6 # lda n+ bne end-code
|
||||||
@ -911,6 +911,9 @@ Code case?
|
|||||||
: LEAVE endloop r> 2- dup @ + >r ;
|
: LEAVE endloop r> 2- dup @ + >r ;
|
||||||
restrict
|
restrict
|
||||||
|
|
||||||
|
code UNLOOP clc rp lda 6 # adc rp sta
|
||||||
|
cs ?[ rp 1+ inc ]? Next jmp end-code
|
||||||
|
|
||||||
\ Returnstack: calladr | index
|
\ Returnstack: calladr | index
|
||||||
\ limit | adr of DO
|
\ limit | adr of DO
|
||||||
|
|
||||||
@ -2702,7 +2705,7 @@ E400 Constant limit Variable first
|
|||||||
name> under 1+ u< swap heap? or ;
|
name> under 1+ u< swap heap? or ;
|
||||||
|
|
||||||
| : endpoints ( addr -- addr symb)
|
| : endpoints ( addr -- addr symb)
|
||||||
heap voc-link @ >r
|
heap voc-link >r
|
||||||
BEGIN r> @ ?dup \ through all Vocabs
|
BEGIN r> @ ?dup \ through all Vocabs
|
||||||
WHILE dup >r 4 - >r \ link on returnst.
|
WHILE dup >r 4 - >r \ link on returnst.
|
||||||
BEGIN r> @ >r over 1- dup r@ u<
|
BEGIN r> @ >r over 1- dup r@ u<
|
||||||
|
@ -13,9 +13,10 @@ Forth also definitions
|
|||||||
|
|
||||||
(C16 : (64 ) \ jumps belhind C)
|
(C16 : (64 ) \ jumps belhind C)
|
||||||
(C64 : (16 )
|
(C64 : (16 )
|
||||||
BEGIN name count 0= abort" C) missing"
|
BEGIN name count dup 0=
|
||||||
|
abort" C) missing" 2 = >r
|
||||||
@ [ Ascii C Ascii ) $100 * + ] Literal
|
@ [ Ascii C Ascii ) $100 * + ] Literal
|
||||||
= UNTIL ; immediate
|
= r> and UNTIL ; immediate
|
||||||
|
|
||||||
: C) ; immediate
|
: C) ; immediate
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ include vf-lbls-cbm.fth
|
|||||||
098 >label InDev
|
098 >label InDev
|
||||||
0ff19 >label BrdCol
|
0ff19 >label BrdCol
|
||||||
0ff15 >label BkgCol
|
0ff15 >label BkgCol
|
||||||
0540 >label PenCol
|
053b >label PenCol
|
||||||
09d >label PrgEnd
|
09d >label PrgEnd
|
||||||
0b2 >label IOBeg
|
0b2 >label IOBeg
|
||||||
0cb >label CurFlg
|
0cb >label CurFlg
|
||||||
|
@ -217,10 +217,13 @@ Code bus@ ( -- 8b)
|
|||||||
: businput ( adr n --)
|
: businput ( adr n --)
|
||||||
bounds ?DO bus@ I c! LOOP pause ;
|
bounds ?DO bus@ I c! LOOP pause ;
|
||||||
|
|
||||||
|
: i/o-status? $90 c@ ;
|
||||||
|
|
||||||
: derror? ( -- flag )
|
: derror? ( -- flag )
|
||||||
disk $F busin bus@ dup Ascii 0 -
|
disk $F busin bus@ dup Ascii 0 -
|
||||||
IF BEGIN emit bus@ dup #cr = UNTIL
|
IF BEGIN emit bus@ dup #cr = UNTIL
|
||||||
0= cr THEN 0= busoff ;
|
0= cr ELSE BEGIN bus@ #cr = UNTIL
|
||||||
|
THEN 0= busoff ;
|
||||||
|
|
||||||
|
|
||||||
\ *** Block No. 140, Hexblock 8c
|
\ *** Block No. 140, Hexblock 8c
|
||||||
@ -306,13 +309,13 @@ Code bus@ ( -- 8b)
|
|||||||
|
|
||||||
: index ( from to --)
|
: index ( from to --)
|
||||||
1+ swap DO
|
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 ;
|
stop? IF LEAVE THEN LOOP ;
|
||||||
|
|
||||||
: findex ( from to --)
|
: findex ( from to --)
|
||||||
diskopen IF 2drop exit THEN
|
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
|
pad dup I 2* 2* s#>t+s readsector
|
||||||
>r 1+ 25 type
|
>r 28 type
|
||||||
r> stop? or IF LEAVE THEN
|
r> stop? or IF LEAVE THEN
|
||||||
LOOP diskclose ;
|
LOOP diskclose ;
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user