Page 4 of 19

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

Posted: Tue Sep 10, 2019 12:53 pm
by srowe
funkheld wrote: Tue Sep 10, 2019 8:35 am a nice vforth

why are the graphics-screen so small please?

How can you make it big, please?
I was trying to have a versatile system that allowed variable sized screens. That's probably not that useful in real life.
I'm planning to replace the graphics subsystem entirely but started looking at doing a 40 x 24 text display instead.
is there a new version of vforth from 2019?
I actually built a new version at the weekend, there are only a few bug fixes though.

I've been busy with another project for a year (which I've just finished) so I should get back to VForth. Let me know other improvements you would like to see.

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

Posted: Tue Sep 10, 2019 2:11 pm
by funkheld
with this basicroutine I have the normal screen.
if you can do it that way you're already in graphics mode.
the start of the program must start at least at address 8192

I use the VICE with 28kb. this adresse begin the : 4352........
---------------------------------------------------------
10 gosub 10000
20 for a=0 to 1000
30 poke 4352+a,129
40 next a
50 poke198,0:wait198,1:sys678
10000 rem Grafik
10030 for i=4352 to 8047 : poke i,0 : next
10040 poke 36867,151 : poke 36866,21 : poke 36869,204
10050 poke 36864,14
10060 for i=16 to 255 : poke 4096+i-16,i : poke 37888+i-16,6 : next i
10070 return
---------------------------------------------------------


no the display with 40 x 24 !
then VIC20 has no 40 x 24.

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

Posted: Tue Sep 10, 2019 3:01 pm
by funkheld
Hi good afternoon.

I wrote that with Notepad ++.
why are there mistakes here?
does that have to be somehow transformed?

Thank you.
greeting

--------------------------------------
: grafikscr
8047 4352 do 0 i c! loop
151 36867 c! 21 36866 c! 204 36869 c! 14 36864 c!
255 16 do i i 4096 + 16 - c! loop
255 16 do i i 37888 + 16 - c! loop ;

: byteplot
1000 0 do 129 i 4352 + c! loop ;
-------------------------------------

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

Posted: Tue Sep 10, 2019 4:16 pm
by funkheld
hello, so now I can already draw as above the bytes.
the starting address of the screen is 4352.
-------------------------------------------
vocabulary grafik immediate
grafik definitions

: grafikscr
8047 4352 do 0 i c! loop
151 36867 c! 21 36866 c! 204 36869 c! 14 36864 c!
255 16 do i i 4096 16 - + c! loop
255 16 do 6 i 37888 16 - + c! loop ;

: zeichne
1000 0 do 129 i 4352 + c! loop ;

forth definitions
------------------------------------------------

can you for the address: 4352 please once implement your plot:
-------------------------------------------------------
: plot ( n x y -- )
over swap byteof current-mode @ .charbase + @ + >r r@ c@
>r maskfor r> and or r> c! ;
------------------------------------------------------

thanks
greeting

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

Posted: Wed Sep 11, 2019 12:53 am
by funkheld
Hi good afternoon.
is there in Vforth also "Forward".

You write a routine that is not filled yet and can then be addressed by another routine.
Also an INLINE would be nice.

greeting

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

Posted: Wed Sep 11, 2019 1:28 am
by funkheld
Hi good afternoon.

can you please explain to me what exactly in VFORTH.PRG and
VFORTH.COM is inside.

Thank you.
greeting

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

Posted: Wed Sep 11, 2019 3:49 am
by orion70
Wow, you look like a v-forth enthusiast :) . I cannot help you, but please, next time put all your questions and considerations in one single post, in order to simplify reading.

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

Posted: Wed Sep 11, 2019 11:44 am
by srowe
funkheld wrote: Tue Sep 10, 2019 2:11 pm no the display with 40 x 24 !
then VIC20 has no 40 x 24.
It has no text mode that would give 40 x 24 but it is possible to use a 20 x 12 double height configuration and define a 4 x 8 pixel character set. There's a lot of work to make this behave correctly in the line editor.

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

Posted: Wed Sep 11, 2019 11:51 am
by funkheld
I said above that it is not necessary to make this text mode 40x24.

the normal textmode of the VIC20 is enough.

Thank you.
greeting

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

Posted: Wed Sep 11, 2019 11:59 am
by funkheld
hello, I put the charset with 2048 byte with me on 5120, and switched. I print an "A".

only Vforth did not get it.

"charset 65 emit" is ok. (red circles in the picture)

Thank you.
greeting

--------------------------------------------------
create chrbyte 255 c, 129 c, 129 c, 129 c, 129 c, 129 c, 129 c, 255 c,

: charset
205 36869 c!
2047 0 do i 32768 + c@ i 5120 + c! loop
8 0 do i chrbyte + c@ i 5128 + c! loop ;
--------------------------------------------

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

Posted: Wed Sep 11, 2019 12:19 pm
by srowe
funkheld wrote: Wed Sep 11, 2019 12:53 am is there in Vforth also "Forward".

You write a routine that is not filled yet and can then be addressed by another routine.
No, the compiler has nowhere to store forward references to words not yet defined.
Also an INLINE would be nice.
Do you mean a way to expand the definition of a word within a definition rather than linking to it? That sort of goes against the concept of a Threaded Interpretive Language.

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

Posted: Wed Sep 11, 2019 12:35 pm
by srowe
funkheld wrote: Wed Sep 11, 2019 1:28 am can you please explain to me what exactly in VFORTH.PRG and
VFORTH.COM is inside.
VFORTH.PRG is a standard binary program that loads at $2000 (8192) and takes up 8K of RAM. So you need 16K or more to run it. VFORTH.ROM is an image that can run at $A0000, a cartridge image, and can handle the memory being read-only.

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

Posted: Wed Sep 11, 2019 1:36 pm
by srowe
funkheld wrote: Wed Sep 11, 2019 11:59 am hello, I put the charset with 2048 byte with me on 5120, and switched. I print an "A".

only Vforth did not get it.

"charset 65 emit" is ok. (red circles in the picture)
There's something odd going on with adding the value 32768 inside a loop

Code: Select all

hex
: test1 8 0 do 7fff i + u. loop cr ;
: test2 8 0 do 8000 i + u. loop cr ;
: test3 8 0 do 8001 i + u. loop cr ;
The output of test1 and test3 are as expected but test2 gives:

Code: Select all

0 1 2 3 4 5 6 7
I'll have to look into what is causing this.

EDIT: this is a compiler bug, the optimization to use CLIT for 8 bit values must be wrong.

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

Posted: Wed Sep 11, 2019 2:18 pm
by funkheld
hello, thanks for the help.

Will the compiler bug be fixed?

can you put down an asm program at $a000 and call "CALL $ a000"

Thank you.
Greeting

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

Posted: Thu Sep 12, 2019 1:00 am
by funkheld
hello, good day.

I started vforth.
Now I want to load an asm program "test.p" to $ a000
"load" test.p ", 8,1
how is that possible?

Thank you.
greeting