Page 13 of 21

Re: V-FORTH - Forth-83 for the VIC

Posted: Sun Nov 17, 2019 3:01 pm
by srowe
It's very easy to lose track of the stack contents. I'd recommend adding a comment to each word to document what is expected before a word executes and what should be left after.

Re: V-FORTH - Forth-83 for the VIC

Posted: Sun Nov 17, 2019 3:42 pm
by funkheld
the mistake is in yours.
even if it is empty comes the stack overflow

: test
begin until ;



greeting

Re: V-FORTH - Forth-83 for the VIC

Posted: Mon Nov 18, 2019 12:45 pm
by srowe
funkheld wrote: Sun Nov 17, 2019 3:42 pm the mistake is in yours.
even if it is empty comes the stack overflow

: test
begin until ;



greeting
until needs a boolean value on the stack use ?terminal if you want to be able to interrupt the loop. Otherwise you can use again for an unconditional loop.

Re: V-FORTH - Forth-83 for the VIC

Posted: Tue Nov 19, 2019 2:49 am
by funkheld
hello, thanks for the info.

greeting

Re: V-FORTH - Forth-83 for the VIC

Posted: Fri Nov 22, 2019 7:52 am
by funkheld
hello good day.

this not funktion in vforth 4.0
------------------------------------
INCLUDE DEMO.FS
INCLUDE AUTOSAVE.FS
' MAZE AUTOSAVE MAZE.PRG
-----------------------------------

tanks
greeting

Re: V-FORTH - Forth-83 for the VIC

Posted: Fri Nov 22, 2019 12:09 pm
by funkheld
Hi good afternoon.

Can you please put the start of vforth on 9216 so I can make graphics at 4096 (506 ascii)?

Thank you
greeting

Re: V-FORTH - Forth-83 for the VIC

Posted: Fri Nov 22, 2019 12:10 pm
by funkheld
Hi good afternoon.

Can you please put the start of vforth.prg and vforth.com on adress 9216 so I can make graphics at 4096 (506 ascii)?

Thank you
greeting

Re: V-FORTH - Forth-83 for the VIC

Posted: Fri Nov 22, 2019 1:36 pm
by srowe
funkheld wrote: Fri Nov 22, 2019 7:52 am this not funktion in vforth 4.0
------------------------------------
INCLUDE DEMO.FS
INCLUDE AUTOSAVE.FS
' MAZE AUTOSAVE MAZE.PRG
-----------------------------------
I think you must be having caching problems again.
Screenshot_20191122_192231.png
Screenshot_20191122_193211.png
Try this image
vforth.d64.zip
(21 KiB) Downloaded 139 times

Re: V-FORTH - Forth-83 for the VIC

Posted: Fri Nov 22, 2019 1:38 pm
by srowe
funkheld wrote: Fri Nov 22, 2019 12:10 pm Can you please put the start of vforth.prg and vforth.com on adress 9216 so I can make graphics at 4096 (506 ascii)?
I'm not sure why moving to 9216 ($2400) helps you. You can't use $2000-$23FFF for graphics as the memory isn't addressable by the VIC chip. Moving the ROM image isn't possible, it occupies the whole the the 8kB space.

Re: V-FORTH - Forth-83 for the VIC

Posted: Fri Nov 22, 2019 2:27 pm
by funkheld
I need the memory of 5120 - (5120 + 4080)
for 510 chars. the screen goes from 4096 - (4096 + 506).
The screen has 506 chars.

thank you for your help.

greeting

Re: V-FORTH - Forth-83 for the VIC

Posted: Fri Nov 22, 2019 2:32 pm
by funkheld
this not funktion with autosave.
starting programm with "gehe"

greeting.

Code: Select all

variable xb 
variable yb 
variable fb 
variable pw
variable sw 
variable cw
variable oxb 
variable oyb 
variable testj1
variable testj2
variable testj3
variable z
variable test

create daten
24  c,  24  c,  60  c,  126  c,  255  c,  24  c,  36  c,  66  c,
255 c,  129  c, 129  c,  129 c,  129  c,  129  c,  129  c,  255  c,

hex
: joy
1  9122  c@  dup  7f  and  9122  c!  
9120  c@  
swap  9122  c!  
80  and  if  1-  then
9111  c@  >r  r@  10  and  0=  if  drop  -1  then
0  r@  4  and  0=  if  1-  else  r@  8  and  0=  if  1+  then  then
1  r>  20  and  if  1-  then  ;
decimal

: cls
511 0 do 32 i 4096 + c! loop 
0 0 $plot ;

: setze
oyb @ 22 * oxb @ + pw ! 32 sw @ pw @ + c!
oyb @ 1 + 22 * oxb @ + pw ! 32 sw @ pw @ + c!
testj1 c@ 255 = if xb @ 1 - xb !  then  xb @ 0 < if 0  xb  ! then  
testj1 c@ 1   = if xb @ 1 + xb !  then  xb @ 21 > if 21 xb ! then  
testj2 c@ 255 = if yb @ 1 - yb !  then  yb @ 0 < if 0  yb  ! then 
testj2 c@ 1   = if yb @ 1 + yb !  then  yb @ 21 > if 21 yb ! then

xb @ oxb c! yb @ oyb c!

yb @ 22 * xb @ + pw ! 
1 sw @ pw @ + c!
fb @ cw @ pw @ + c!

yb @ 1 + 22 * xb @ + pw ! 
0 sw @ pw @ + c!
fb c@ cw @ pw @ + c! ;

: time 1000 0 do loop ;

: wechsle 8 0 do 0 5128 i + c! loop  ;
: wechsle1 16 0 do daten i + c@ 5120 i + c! loop ;

: joysetze
joy testj3 c! testj2 c! testj1 c!
testj1 c@ 255 = if setze then
testj1 c@ 1 = if setze then
testj2 c@ 255 = if setze then
testj2 c@ 1 = if setze then
testj3 c@ 1 = if wechsle then ;

: gehe 
205 36869 c!
16 0 do daten i + c@ 5120 i + c! loop 

4096 sw !
37888 cw !

10 yb !  10 xb  ! 5 fb !
xb @ oxb ! yb @ oyb !

cls
setze

begin
time
joysetze
197 c@ 18 = if wechsle1 then
197 c@ 17 = if wechsle then
197 c@ 10 = if 1 sw @ c! 3 cw @ c! then
?terminal 
until  ;

Re: V-FORTH - Forth-83 for the VIC

Posted: Fri Nov 22, 2019 2:46 pm
by srowe
funkheld wrote: Fri Nov 22, 2019 2:27 pm I need the memory of 5120 - (5120 + 4080)
for 510 chars. the screen goes from 4096 - (4096 + 506).
The screen has 506 chars.
Can you describe your memory layout more clearly? I still don't understand what you plan to locate at $2000.

Re: V-FORTH - Forth-83 for the VIC

Posted: Fri Nov 22, 2019 3:36 pm
by funkheld
Thanks, my question has settled.
I can indeed extend the char from 8 bytes to 16 bytes if
I poke 36867,151 enter.

thanks.
greeting

Re: V-FORTH - Forth-83 for the VIC

Posted: Sat Nov 23, 2019 2:38 am
by funkheld
Hi good afternoon.
it works now.
I had made it from the vforth.rom.
it only works with the vforth.prg from the disk

sys8192 and control with the joy.


Thanks
Greetings

Re: V-FORTH - Forth-83 for the VIC

Posted: Sat Nov 23, 2019 6:34 am
by funkheld
Hi good afternoon.

can you convert the autosave so that autosave can also be done by vforth.rom.
it is too cumbersome for me to start the vforth from the disk to autosave and then
start vforth.rom again.


Thanks & Greetings