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 »

hello thanks for the help.

wonderfull.

greeting
User avatar
srowe
Vic 20 Scientist
Posts: 1339
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

I've just added support for multicolour bitmap graphics.
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.

thanks, is a great thing you have put together.

thanks.
greeting
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.

how can you compile the vforth in windows 10?

what do you have to download for windows so that the make runs?
cpp -P -w -x assembler-with-cpp

I already have python 3.

thanks.
greeting
User avatar
pixel
Vic 20 Scientist
Posts: 1353
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

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

Post by pixel »

funkheld wrote: Thu Oct 24, 2019 1:09 am I already have python 3.
That would be GNU Make, ported by DJ Delorie.

Am very excited about the new 4.0 version!
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
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, thanks for the info.

greeting
User avatar
srowe
Vic 20 Scientist
Posts: 1339
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

It's a very long time since I ran UNIX tools on Windows.

I think this is a list of what you need:
  • make
  • gcc (for cpp)
  • expand
  • python3
  • vice (for c1541 and petcat)
For the first three you will need something like https://cygwin.com/, the other two should work with Windows versions.
User avatar
Mike
Herr VC
Posts: 4839
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

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

Post by Mike »

Admittedly, I must have lost track about the thread topic at some time here:
srowe wrote: Thu Oct 24, 2019 9:37 amI think this is a list of what you need:
  • make
  • gcc (for cpp)
  • expand
  • python3
  • vice (for c1541 and petcat)
... are the users of VFORTH now supposed to build it on their own? That to say, at least I could not find any hint to the most recent *.d64 release or - equivalent - a folder/directory with VFORTH.PRG and all the current *.FS libraries, which could be copied directly on a SD card.

Especially given that there have been quite some important bug-fixes, I'd be very interested to try out VFORTH.

Is there a document which lists the built-in words of the base system (i.e. those available without any *.FS libraries loaded)? Likewise, is there a dependency graph that lists in which order *.FS libraries have to be loaded?
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 »

this os the word-list :

Code: Select all

----------------------------------
Word           Set
----           ---

!              Required, nucleus
!CSP
#              Required, interpreter
#>             Required, interpreter
#S             Required, interpreter
#TIB           Required, interpreter
$CHKIN         V-Forth, KERNAL
$CHKOUT        V-Forth, KERNAL
$CLOSE         V-Forth, KERNAL
$CLRCHN        V-Forth, KERNAL
$LOAD          V-Forth, KERNAL
$OPEN          V-Forth, KERNAL
$PLOT          V-Forth, KERNAL
$READ          V-Forth, KERNAL
$READLINE      V-Forth, KERNAL
$READST        V-Forth, KERNAL
$RSTIN         V-Forth, KERNAL
$RSTOUT        V-Forth, KERNAL
$SAVE          V-Forth, KERNAL
$SETLFS        V-Forth, KERNAL
$SETNAM        V-Forth, KERNAL
$WRITE         V-Forth, KERNAL
$WRITEB        V-Forth, KERNAL
'              Required, interpreter
(              Required, interpreter
(")            Runtime
(+LOOP)        Runtime
(.")           Runtime
(;CODE)        Runtime
(?DO)          Runtime
(ABORT")       Runtime
(DO)           Runtime
(EXPECT)
(FIND)         Runtime
(LOOP)         Runtime
*              Required, nucleus
*/             Required, nucleus
*/MOD          Required, nucleus
+              Required, nucleus
+!             Required, nucleus
+-
+LOOP          Required, compiler
+ORIGIN
,              Required, compiler
-              Required, nucleus
-1             Constant
-TRAILING      Required, interpreter
.              Required, interpreter
."             Required, compiler
.(             Required, interpreter
.R             Controlled
/              Required, nucleus
/MOD           Required, nucleus
0              Constant
0<             Required, nucleus
0=             Required, nucleus
0>             Required, nucleus
1              Constant
1+             Required, nucleus
1-             Required, nucleus
2              Constant
2!             Double number, nucleus
2*             Controlled
2+             Required, nucleus
2-             Required, nucleus
2/             Required, nucleus
2@             Double number, nucleus
2CONSTANT      Double number, compiler
2DROP          Double number, nucleus
2DUP           Double number, nucleus
2OVER          Double number, nucleus
2ROT           Double number, nucleus
2SWAP          Double number, nucleus
2VARIABLE      Double number, compiler
3              Constant
:              Required, compiler
;              Required, compiler
;CODE          Assembler, compiler
<              Required, nucleus
<#             Required, interpreter
=              Required, nucleus
>              Required, nucleus
>BODY          Required, interpreter; field address
>IN            Required, interpreter
>LINK          Field address
>NAME          Field address
>R             Required, nucleus
?
?BRANCH        System, nucleus
?COMP
?CSP
?DO            ANSI
?DUP           Required, nucleus
?ERROR
?EXEC
?IOERR         V-Forth, file I/O
?PAIRS
?STACK
?TERMINAL
@              Required, nucleus
[              Required, compiler
[']            Required, compiler
[CHAR]         ANSI
[COMPILE]      Required, compiler
]              Required, compiler
ABORT          Required, interpreter
ABORT"         Required, compiler
ABS            Required, nucleus
AGAIN          Uncontrolled
ALLOT          Required, compiler
AND            Required, nucleus
ASSEMBLER      Assembler, interpreter
AUX.HERE
AUX.ORIGIN
BASE           Required, interpreter
BASIC          V-Forth, system
BEGIN          Required, compiler
BL             Controlled
BLANK          Controlled
BODY>          Field address
BRANCH         System, nucleus
C!             Required, nucleus
C,             Controlled
C/L
C@             Required, nucleus
CATCH          V-Forth, exception
CHAR           ANSI
CLIT           Runtime
CLOSE-FILE     V-Forth, file I/O
CMOVE          Required, nucleus
CMOVE>         Required, nucleus
CODE           Assembler, compiler
COLD
COMPILE        Required, compiler
CONSTANT       Required, compiler
CONTEXT        System, interpreter
CONVERT        Required, interpreter
COUNT          Required, nucleus
CR             Required, device
CREATE         Required, compiler
CSP
CURRENT        System, interpreter
D+             Required, nucleus; double number, nucleus
D+-
D-             Double number, nucleus
D.             Double number, interpeter
D.R            Double number, interpeter
D0=            Double number, nucleus
D2/            Double number, nucleus
D<             Required, nucleus, double number, nucleus
D=             Double number, nucleus
D>             Double number, nucleus
DABS           Double number, nucleus
DECIMAL        Required, interpreter
DEFINITIONS    Required, interpreter
DEPTH          Required, nucleus
DEVICE#        V-Forth, file I/O
DIGIT
DLITERAL       Runtime
DLOAD          V-Forth, file I/O
DMIN           Double number, nucleus
DNEGATE        Required, nucleus; double number, nucleus
DO             Required, compiler
DODOES         Runtime
DOES>          Required, compiler
DP
DPL            Uncontrolled
DROP           Required, nucleus
DSAVE          V-Forth, file I/O
DU<            Double number, nucleus
DUP            Required, nucleus
ELSE           Required, compiler
EMIT           Required, device
ENCLOSE
ERASE          Controlled
ERROR          V-Forth, exception
EX-ERROR       V-Forth, exception
EXCEPTION      V-Forth, exception
EXECUTE        Required, nucleus
EXIT           Required, nucleus
EXPECT         Required, device
FALSE          ANSI
FATAL          V-Forth, exception
FENCE
FILL           Required, nucleus
FIND           Required, interpreter
FORGET         Required, interpreter
FORTH          Required, interpreter
FORTH-83       Required, interpreter
FREEPGS        V-Forth, system
GETPAGE        V-Forth, system
HERE           Required, interpreter
HEX            Controlled
HLD
HOLD           Required, interpreter
I              Required, nucleus
ID.
IF             Required, compiler
IMMEDIATE      Required, compiler
INBUF
INCLUDE        V-Forth, file I/O
INCLUDE?       V-Forth, file I/O
INCLUDED       V-Forth, file I/O
INTERPRET      Controlled
IODIAG         V-Forth, file I/O
J              Required, nucleus
KEY            Required, device
LAST           Uncontrolled
LATEST
LEAVE          Required, compiler
LIT            Runtime
LITERAL        Required, compiler
LOADD          V-Forth, file I/O
LOOP           Required, compiler
LSHIFT         ANSI
M*
M/MOD
MAX            Required, nucleus
MESSAGE
MIN            Required, nucleus
MOD            Required, nucleus
NAME
NAME>          Field address
NEGATE         Required, nucleus
NEXTLFN        V-Forth, file I/O
NEXTSA         V-Forth, file I/O
NIP            ANSI
NOT            Required, nucleus
NUMBER         Uncontrolled
OPEN-FILE      V-Forth, file I/O
OR             Required, nucleus
OUT
OVER           Required, nucleus
PAD            Required, interpreter
PICK           Required, nucleus
PUTPAGE        V-Forth, system
QUERY          Controlled
QUIT           Required, interpreter
R>             Required, nucleus
R@             Required, nucleus
RAISE          V-Forth, exception
READ-FILE      V-Forth, file I/O
READ-LINE      V-Forth, file I/O
REPEAT         Required, compiler
ROLL           Required, nucleus
ROT            Required, nucleus
RP!
RSHIFT         ANSI
S"             ANSI
S->D
SAREG          V-Forth, system
SAVED          V-Forth, file I/O
SIGN           Required, interpreter
SMUDGE
SP!
SP@            Controlled
SPACE          Required, device
SPACES         Required, device
SPAN           Required, interpreter
SPREG          V-Forth, system
STATE          Required, compiler
SWAP           Required, nucleus
SXREG          V-Forth, system
SYREG          V-Forth, system
SYS            V-Forth, system
THEN           Required, compiler
TIB            Required, interpreter
TIME!          V-Forth, KERNAL
TIME@          V-Forth, KERNAL
TOGGLE
TRAVERSE
TRUE           ANSI
TUCK           ANSI
TYPE           Required, device
U.             Required, interpreter
U<             Required, nucleus
UD/MOD
UM*            Required, nucleus
UM/MOD         Required, nucleus
UNTIL          Required, compiler
USER           Uncontrolled
VARIABLE       Required, compiler
VOC-LINK
VOCABULARY     Required, compiler
WHERE          V-Forth, exception
WHILE          Required, compiler
WORD           Required, interpreter
WORDS          Uncontrolled
WRITE-FILE     V-Forth, file I/O
WRITE-LINE     V-Forth, file I/O
X
XOR            Required, nucleus
--------------------------------------------
greeting

(mod: long list put into code-tags to save on screen estate, see also wordlist.txt in vforth.git)
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.
srowe can you please translate this into the vforth for me.
this is rs232 works in vic20.


thanks.
greeting

in basic it works:
----------------------------------------------
10 open2,2,0,chr$(8)+chr$(0)
20 get#2,a$ : print a$;
30 get a$ : print a$; : if a$<>""then s$=s$+a$
40 if a$=chr$(13)then print#2,s$; : s$=""
50 goto 20
-------------------------------------------------
Last edited by funkheld on Fri Oct 25, 2019 2:38 pm, edited 2 times in total.
User avatar
srowe
Vic 20 Scientist
Posts: 1339
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

Mike wrote: Thu Oct 24, 2019 11:54 am
... are the users of VFORTH now supposed to build it on their own? That to say, at least I could not find any hint to the most recent *.d64 release or - equivalent - a folder/directory with VFORTH.PRG and all the current *.FS libraries, which could be copied directly on a SD card.
No, regular users won't need to build from source. If you want make changes to the core definitions (or the CBM interface) then you need to edit vforth.fs or system.fs and rebuild.
User avatar
Mike
Herr VC
Posts: 4839
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

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

Post by Mike »

srowe wrote: Fri Oct 25, 2019 10:19 amNo, regular users won't need to build from source. If you want make changes to the core definitions (or the CBM interface) then you need to edit vforth.fs or system.fs and rebuild.
That's reassuring to know. :D

Re my other questions: PM sent. :)
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 »

No, regular users won't need to build from source. If you want make changes to the core definitions (or the CBM interface) then you need to edit vforth.fs or system.fs and rebuild.
Hi good afternoon.

how do you do that under windows?

thanks.
greeting
User avatar
srowe
Vic 20 Scientist
Posts: 1339
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

funkheld wrote: Fri Oct 25, 2019 1:42 am Hi good afternoon.
srowe can you please translate this into the vforth for me.
this is rs232 works in vic20.


thanks.
greeting

in basic it works:
----------------------------------------------
10 open2,2,0,chr$(8)+chr$(0)
20 get#2,a$ : print a$;
30 get a$ : print a$; : if a$<>""then s$=s$+a$
40 if a$=chr$(13)then print#2,s$; : s$=""
50 goto 20
-------------------------------------------------
I think this should work, I don't have an RS-232 setup to hand

Code: Select all

8 constant 1200baud

variable lfh

: open  ( baud  --  )
    pad  c!  0  pad  1+  c!  pad  2  $setnam
    nextlfn  lfh  !  0  2  lfh  @  $setlfs  $open  drop  ;

: close  (  --  )
    lfh  @  $close  drop  ;

: read-echo  (  --  )
    pad  256  lfh  @  read-line  ?ioerr
    pad  count  type  cr  ;

: serial-test
    1200baud  open
    begin
	read-echo  ?terminal
    until  close  ;
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, thanks for your help.

When I send the data, an error message comes.

thanks.
greeting
Attachments
Bild2.jpg
Post Reply