V-FORTH - Forth-83 for the VIC

Basic and Machine Language

Moderator: Moderators

funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

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

Post by funkheld »

Hi good afternoon.

you can also do that with interrupt:
"rightshift" >>>>>> this with interrupt ?


greeting

Code: Select all

include assembler.fs

variable charbase

5120 charbase !
8192 constant ramhi
32768 constant charset1

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

hex
code rightshift
xsave stx,
0 # ldx,
begin,
1400 ,x lda,
.a lsr,
1400 8 + ,x ror,
1400 10 + ,x ror,
1400 18 + ,x ror,
1400 20 + ,x ror,
1400 28 + ,x ror,
1400 30 + ,x ror,
1400 38 + ,x ror,
1400 40 + ,x ror,
1400 48 + ,x ror,
1400 50 + ,x ror,
1400 58 + ,x ror,
1400 60 + ,x ror,
1400 68 + ,x ror,
1400 70 + ,x ror,
1400 78 + ,x ror,
1400 80 + ,x ror,
1400 88 + ,x ror,
1400 90 + ,x ror,
1400 98 + ,x ror,
1400 0a0 + ,x ror,
1400 0a8 + ,x ror,
1400 ,x ror,
inx,
8 # cpx,
0= until,
xsave ldx,
next jmp,
end-code
decimal

: redefset  
charbase  @  ramhi  over  -  cmove
charbase  @  charbase !  ;

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

: ti 250 0 do loop ;

: text
12 36864 c! 22 36866 c! 174 36867 c! 192 36869 c! ;

: gehe 
charset1 redefset 
205 36869 c!

cls
2047 0 do 0 5120 i + c! loop 
8 0 do daten i + c@ 5120 i + c! loop 

22 0 do i i 4096 +  c! loop
22 0 do 4 i 37888 + c! loop

begin
ti
rightshift  >>>>>>>>>>>>>>>>>>>>>>>>> this with interrupt ?????
197 c@ 
48 = if text then  ?terminal
until ;
User avatar
srowe
Vic 20 Scientist
Posts: 1341
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

It should be possible to call any sort of word, as long as the time it takes to execute is less than the interrupt frequency. I assume you're looking to just use the 60 Hz timer to scroll the screen?
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

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

Post by funkheld »

yes, that's how I imagine it.
also small programs, which are executable under this time 60hz.

Thank you.
hruss
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

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

Post by funkheld »

Hi good afternoon.
a mini helicopter with interrupt.
the propeller is turned via the interrupt.

to save memory in the vforth, I put the ASM after 1024.
the asm program is at memory 1024.

is controlled heli : q / w / e / s.
the ascii A / G / I stop the heli.

load "gehe.prg", 8,1
sys8192


greeting

Code: Select all

variable xb 
variable yb 
variable fb 
variable pw
variable sw 
variable cw
variable oxb 
variable oyb 

variable charbase
variable z

5120 charbase !
8192 constant ramhi
32768 constant charset1

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

: redefset  
charbase  @  ramhi  over  -  cmove
charbase  @  charbase !  ;

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

: ti 300 0 do loop ;

: set
xb @ oxb c! yb @ oyb c!

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

: clearxy
oyb @ 22 * oxb @ + pw ! 32 sw @ pw @ + c! ;

: lin
clearxy
xb @ 1 - xb ! xb @ 0 < if 0  xb ! then  
yb @ 22 * xb @ + 115 = if xb @ 1 + xb ! then 
yb @ 22 * xb @ + 186  = if xb @ 1 + xb ! then
yb @ 22 * xb @ + 338  = if xb @ 1 + xb ! then set ;

: rec
clearxy
xb @ 1 + xb ! xb @ 21 > if 21 xb ! then  
yb @ 22 * xb @ + 115 = if xb @ 1 - xb ! then 
yb @ 22 * xb @ + 186 = if xb @ 1 - xb ! then 
yb @ 22 * xb @ + 338 = if xb @ 1 - xb ! then set ;

: obe
clearxy
yb @ 1 - yb ! yb @ 0 < if 0  yb ! then 
yb @ 22 * xb @ + 115 = if yb @ 1 + yb ! then 
yb @ 22 * xb @ + 186 = if yb @ 1 + yb ! then 
yb @ 22 * xb @ + 338 = if yb @ 1 + yb ! then set ;

: unt
clearxy
yb @ 1 + yb ! yb @ 22 > if 22 yb ! then 
yb @ 22 * xb @ + 115  =  if yb @ 1 - yb ! then 
yb @ 22 * xb @ + 186  =  if yb @ 1 - yb ! then 
yb @ 22 * xb @ + 338  =  if yb @ 1 - yb ! then set ;

: farbe+
fb @ 1 + fb ! fb @ 7 > if 7  fb ! then set ;

: farbe-
fb @ 1 - fb ! fb @ 0 < if 0  fb ! then set ;

: load
$setnam
1 8 8 $setlfs
0 $load ?ioerr drop ;

: gehe 
s" intdrehe.p" load 
8 $close
cls
1024 sys

charset1 redefset 
205 36869 c!

8 0 do daten i + c@ 5120 i + c! loop 

4096 sw !
37888 cw !

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

1 sw @ 115 + c!
3 cw @ 115 + c! 
7 sw @ 186 + c!
6 cw @ 186 + c! 
9 sw @ 338 + c!
5 cw @ 338 + c! 

set  

begin
197 c@ 
dup 48 = if lin then  
dup 49 = if rec then  
dup 9  = if obe then 
     41 = if unt then
?terminal 
until  ;

Code: Select all

!to "intdrehe.p", cbm

	*=1024
	sei
	lda #<irq
	sta $0314
	lda #>irq 
	sta $0315                       
	cli  
	rts    

	*=1100
irq                                 
       bne .exit	
	
	ldx #0
drehe1
        lda #255
	sta 5120
	inx
	cpx #255
	bne drehe1
	
	ldx #0
drehe2
        lda #126
	sta 5120
	inx
	cpx #255
	bne drehe2	
	
	ldx #0
drehe3
        lda #60
	sta 5120
	inx
	cpx #255
	bne drehe3		
	ldx #0
	
drehe4
       lda #24
	sta 5120
	inx
	cpx #255
	bne drehe4		

.exit                             
	jmp $eabf	
	rts
Attachments
heli.jpg
disk-heli.zip
(17.16 KiB) Downloaded 125 times
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

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

Post by funkheld »

vfgrafik.jpg
Hi good afternoon.
have now once again played with the graphics from vforth.

greeting

Code: Select all

variable l

: getbad
dup  16  /  336  *  swap  15  and  +
swap  8  /  16  *  +  4352  +  ;

create bmask
128  c,  64  c,  32  c,  16  c,  8  c,  4  c,  2  c,  1  c,

: plot
over  swap
getbad  swap  7  and  bmask  +  c@ over  c@ or  swap  c!  ;

: unplot
over  swap
getbad  swap  7  and  bmask  +  c@ not over  c@ and  swap  c!  ;

: xplot
over  swap
getbad  swap  7  and  bmask  +  c@ over  c@ xor  swap  c!  ;

: grafikscr
8048 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 ;

: rechte
50 l c@ + 10 l c@ + do 10 l c@ + i  plot loop 
50 l c@ + 10 l c@ + do i 10 l c@ +  plot loop
50 l c@ + 10 l c@ + do i 50 l c@ +  plot loop
51 l c@ + 10 l c@ + do 50 l c@ + i  plot loop ;

: text
12 36864 c! 22 36866 c! 174 36867 c! 192 36869 c! ;

: gehe
grafikscr 
5 l c!
10 0 do rechte l c@ 10 + l c!  loop key . text ;
Last edited by funkheld on Sat Dec 21, 2019 8:24 am, edited 1 time in total.
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

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

Post by funkheld »

Hi good afternoon.
can you please implement the drawto for my strategy without the "i" just drawto (x y - -)?

Thank you.
greeting

Code: Select all

variable lastx
variable lasty

: getbad
dup  16  /  336  *  swap  15  and  +
swap  8  /  16  *  +  4352  +  ;

create bmask
128  c,  64  c,  32  c,  16  c,  8  c,  4  c,  2  c,  1  c,

: plot
over  swap
getbad  swap  7  and  bmask  +  c@ over  c@ or  swap  c!  ;

: unplot
over  swap
getbad  swap  7  and  bmask  +  c@ not over  c@ and  swap  c!  ;

: xplot
over  swap
getbad  swap  7  and  bmask  +  c@ over  c@ xor  swap  c!  ;

: goto
lasty  !  lastx  !  ;

: drawto   ( i x y -- )
    pad  !  pad  2+  !  pad  4  +  !
    pad  2+  @  lastx  @  -  abs  pad  6  +  !   ( dx )
    lastx  @  pad  2+  @  <  if  1  else  -1  then  pad  8  +  !   ( sx )
    pad  @  lasty  @  -  abs  negate  pad  10  +  !   ( dy )
    lasty  @  pad  @  <  if  1  else  -1  then  pad  12  +  !   ( sy )
    pad  6  +  @  pad  10  +  @  +   ( err )
    begin
	pad  4  +  @  lastx  @  lasty  @  graphics  plot
	lastx  @  pad  2+  @  -  lasty  @  pad  @  -  or  while
	    dup  2*   ( e2 )
	    dup  pad  10  +  @  <  0=  if
		pad  8  +  @  lastx  +!
		swap  pad  10  +  @  +  swap  then
	    1-  pad  6  +  @  <  if
		pad  12  +  @  lasty  +!
		pad  6  +  @  +  then
    repeat  drop  ;
		
: lines
10 30 goto
60 70 drawto
110 30 drawto
10 30 drawto ;

: grafikscr
8048 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 ;

: text
12 36864 c! 22 36866 c! 174 36867 c! 192 36869 c! ;

: gehe
grafikscr 
lines key . text ;
User avatar
srowe
Vic 20 Scientist
Posts: 1341
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

Here is a new build of V-FORTH that supports running words in an interrupt. The following example changes the border colour every interrupt while the main program loops printing stars.

Code: Select all

include assembler.fs
include interrupt.fs

( this word will be called on each timer expiry )
: isr
    36879  c@  dup 248  and  swap  1+  7  and  or  36879  c!  ;

' isr  interrupt  irqw!

: test
   interrupt  setup
    begin
        42 emit
    ?terminal  until
    interrupt  restore  ;

forth
Attachments
vforth.d64.zip
(21.31 KiB) Downloaded 125 times
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

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

Post by funkheld »

Hi good afternoon.
Many thanks for your help with the interrupt in vforth.
works wonderfully.

Thank you.
greeting
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: V-FORTH - Forth-83 for the VIC (Vforth.rom)

Post by funkheld »

Hi good afternoon.
why is the first row with the pattern not displayed correctly with vforth?

Thank you.
greeting

Code: Select all

variable xb 
variable yb  
variable pw
variable sw 
variable cw

variable charbase

5120 charbase !
8192 constant ramhi
32768 constant charset1

create mu
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,

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,

: redefset  
charbase  @  ramhi  over  -  cmove
charbase  @  charbase !  ;

: muster
506 0 do 4 i 37888 + c! loop
506 0 do 32 i 4096 + c! loop  
22  0 do mu i + c@ 4096 i +  c! loop ;

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

: ti 200 0 do loop ;

: set
yb @ 22 * xb @ + pw ! 
0 sw @ pw @ + c!
6 cw @ pw @ + c! ;

: lin
xb @ 1 - xb ! xb @ 0 < if 0  xb ! then set ;

: rec
xb @ 1 + xb ! xb @ 21 > if 21 xb ! then  set ;

: obe
yb @ 1 - yb ! yb @ 0 < if 0  yb ! then set ;

: unt
yb @ 1 + yb ! yb @ 22 > if 22 yb ! then set ;

: farbe+
fb @ 1 + fb ! fb @ 7 > if 7  fb ! then set ;

: farbe-
fb @ 1 - fb ! fb @ 0 < if 0  fb ! then set ;

: gehe 
charset1 redefset 
205 36869 c!

16 0 do daten i + c@ 5120 i + c! loop 

4096 sw !
37888 cw !

10 yb ! 10 xb ! 

muster
set  

begin
ti
197 c@ 
dup 17 = if lin then  
dup 18 = if rec then  
dup 9  = if obe then 
    41 = if unt then
?terminal 
until  ;
Attachments
muster.jpg
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

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

Post by funkheld »

hello, if I split the text between them, it works.

Why?

Thank you.
greeting

-------------------------------------------------------
create mu
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
------------------------------------------------------

and this is ok:
---------------------------------------------------------
create mu
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
------------------------------------------------------------------------------
Attachments
muster2.jpg
muster1.jpg
User avatar
srowe
Vic 20 Scientist
Posts: 1341
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

I couldn't get your example to compile, there are undefined references to fb. If I take them out, by deleting farbe+ and farbe-, everything seems to work.
Screenshot_20191231_084137.png
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

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

Post by funkheld »

hello, this is ok (Vforth.rom);
variable fb

greeting
ps: can you please implement the drawto for my strategy without the "i" just drawto (x y - -)?

Code: Select all

variable xb 
variable yb  
variable pw
variable sw 
variable cw
variable fb

variable charbase

5120 charbase !
8192 constant ramhi
32768 constant charset1

create mu
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c, 1 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,
32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c, 32 c,

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,

: redefset  
charbase  @  ramhi  over  -  cmove
charbase  @  charbase !  ;

: muster
506 0 do 32 i 1024 + c! loop  
264 0 do mu i + c@ 1024 i +  c! loop 
506 0 do 4 i 37888 + c! loop ;

: schiebe
1024 4096 506 cmove ;

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

: ti 100 0 do loop ;

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

: lin
schiebe
xb @ 1 - xb ! xb @ 0 < if 0  xb ! then
yb @ 22 * xb @ + 4096 + c@  1 = if  xb @ 1 + xb ! then set ;

: rec
schiebe
xb @ 1 + xb ! xb @ 21 > if 21 xb ! then
yb @ 22 * xb @ + 4096 + c@  1 = if  xb @ 1 - xb ! then set ;

: obe
schiebe
yb @ 1 - yb ! yb @ 0 < if 0  yb ! then
yb @ 22 * xb @ + 4096 + c@  1 = if  yb @ 1 + yb ! then set ;

: unt
schiebe
yb @ 1 + yb ! yb @ 22 > if 22 yb ! then
yb @ 22 * xb @ + 4096 + c@  1 = if  yb @ 1 - yb ! then set ;

: farbe+
fb @ 1 + fb ! fb @ 7 > if 7  fb ! then set ;

: farbe-
fb @ 1 - fb ! fb @ 0 < if 0  fb ! then set ;

: gehe 
charset1 redefset 
205 36869 c!

16 0 do daten i + c@ 5120 i + c! loop 

4096 sw !
37888 cw !

12 yb ! 10 xb ! 

muster
schiebe
set  

begin
ti ti ti
197 c@ 
dup 17 = if lin then  
dup 18 = if rec then  
dup 9  = if obe then 
dup 41 = if unt then
dup 10 = if fb @ 1 + fb ! then  fb @ 7 > if 7  fb ! then set
    42 = if fb @ 1 - fb ! then  fb @ 0 < if 0  fb ! then set
?terminal 
until  ;
Attachments
test2.jpg
test1.jpg
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

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

Post by funkheld »

Hi good afternoon.
when i start include .... the drive does not turn off when the fs is loaded. (vforth.rom)

the forth programs always run without one
error message

Thank you.
greeting

Code: Select all

VARIABLE CHARBASE
VARIABLE Z

5120 CHARBASE !
8192 CONSTANT RAMHI
32768 CONSTANT CHARSET1

: CLS
511 0 DO 32 I 4096 + C! 1 I 37888 + C! LOOP 
0 0 $PLOT ;

: REDEFSET  
CHARBASE  @  RAMHI  OVER  -  CMOVE
CHARBASE  @  CHARBASE !  ;

: GEHE 
CHARSET1 REDEFSET 
205 36869 C!

128 0 DO I I 4096 + C! 4 I 37888 + C! LOOP 

BEGIN
KEY  DROP ?TERMINAL
UNTIL ;
Attachments
laufwerk.jpg
User avatar
srowe
Vic 20 Scientist
Posts: 1341
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

Can you attach the file here?
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

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

Post by funkheld »

hallo, thanks.

this is the program above the picture.

greeting
Post Reply