V-FORTH - Forth-83 for the VIC

Basic and Machine Language

Moderator: Moderators

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

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

Post by srowe »

It's probably UNIX line endings, I convert the files automatically when building the disk image. Try this file.
Attachments
demo-case.zip
(422 Bytes) Downloaded 134 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 »

thank you for your effort.

it's not working.
exactly the mistake as with the lineto.

one please, do case and lineto times on a vforth.d64?

Thank you.
greeting
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

I'm on vacation now and don't have access to my computer. You should be able to paste each line into a new file.
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.
all the best on vacation.

I re-typed all the lines in my case.
the same mistake comes here too.

Thank you.
greeting
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

Here is a new build with a case module complete with example file.
Attachments
vforth.zip
(54.81 KiB) Downloaded 101 times
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

Not worked on this for a while but here's the latest build which includes support of loading MINIGRAFIK images.
Attachments
vforth.zip
(55.12 KiB) Downloaded 104 times
User avatar
pixel
Vic 20 Scientist
Posts: 1357
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 »

Too sad that the Git repo has gone. Moved some place else?
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

pixel wrote: Sat Aug 28, 2021 2:20 am Too sad that the Git repo has gone. Moved some place else?
Shouldn't have, but I re-installed the server so I could have broke something. Let me check.

Are you browsing it from https://eden.mose.org.uk/gitweb/?p=vforth.git;a=summary or cloning it?

Edit: if you were cloning it with a remote containing /var/www/html/vforth.git I've added a symlink which should have fixed it
User avatar
pixel
Vic 20 Scientist
Posts: 1357
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 »

srowe wrote: Sat Aug 28, 2021 2:26 am Shouldn't have, but I re-installed the server so I could have broke something. Let me check.
It resurfaced. Thanks! Am cloning it. 8)

EDIT: Now some "d64-format" is missing. can it be replaced with VICE's c1541 image tool?
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
armypavarmy
Vic 20 Hobbyist
Posts: 107
Joined: Wed Oct 02, 2013 1:54 am
Location: Italy

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

Post by armypavarmy »

Hello everyone
This listing I took from the C64 version
It doesn't work with the Vicforth because the RND command is not recognized.
How to add it to Vfort V4.7??
Thanks for help.
Attachments
oneline Vic20- Forth.jpg
oneline Vic20- Forth.jpg (54.26 KiB) Viewed 1357 times
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

There's no RND word defined in any FORTH standard as far I know. I've used a linear-feedback shift register (LFSR) as a random number generator in some of my examples.

Assuming that your code expects limit RND to return a random integer between 0 and limit-1 the following should work

Code: Select all

variable rndseed
44257 rndseed !

: rnd
    rndseed  @  dup  7  rshift  xor  dup  9  lshift  xor
    dup  13  rshift  xor  dup  rndseed  !  1-  swap  mod  ;
armypavarmy
Vic 20 Hobbyist
Posts: 107
Joined: Wed Oct 02, 2013 1:54 am
Location: Italy

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

Post by armypavarmy »

Thanks for help.
I need instructions to use the Autosave.fs
to save the written file.
Greetings
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

I've just tried to walk through an example of using AUTOSAVE and it isn't working. I'll need some time to look into why.
armypavarmy
Vic 20 Hobbyist
Posts: 107
Joined: Wed Oct 02, 2013 1:54 am
Location: Italy

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

Post by armypavarmy »

Thanks for the help. I await news
Greetings. Armando
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

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

Post by srowe »

I've released 4.9 which has a fixed AUTOSAVE.FS

You can use it as follows:

Given a program like this

Code: Select all

: EXAMPLE
CR ." HELLO" CR ;
include the autosave module and save the dictionary

Code: Select all

INCLUDE AUTOSAVE.FS
' EXAMPLE AUTOSAVE MY-EXAMPLE
Reset then load and run your program with

Code: Select all

DLOAD MY-EXAMPLE
Post Reply