Skip to content

A Fantasy Computer using Forth as its system language

License

Notifications You must be signed in to change notification settings

raydeejay/retro-40

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

retro-40

A Fantasy Computer using Forth as its system language.

About

Inspiration

Lambda/8
Jupiter ACE

Specs

256x192 screen
16-colour palettes

Usage

Forth is both the programming and the command language for
Retro-40. You can type commands or even new definitions on the
console.

Storage

TBD

Included software

Sprite editor
Snake

The language

Retro-40 software is written in Ficl, the Forth-Inspired Command Language.

Writing a program

Vocabularies
<init>
<update>
<draw>
INSTALL

Blitting variables

API

P!
P@
SP!
SP@
M!
M@
SPR
MAP
pressed?
just-pressed?
was-pressed?
MOUSEX
MOUSEY
MOUSEB

Skeleton program

17 FICL-VOCABULARY myprog-voc
ALSO myprog-voc DEFINITIONS


\ your code goes here
: ?exit     ( -- )  SCANCODE_Q pressed? IF  retro-40  THEN ;


\ these are the hooks that R40 expects to find
: <init>    ( -- )  S" myprog.spr" load-sprites  s" myprog.map" load-map  ( ... ) ;
: <update>  ( -- )  ?exit ( ... ) ;
: <draw>    ( -- )  ( ... )  ;


\ install the software ()
PREVIOUS DEFINITIONS

ALSO myprog-voc

INSTALL myprog

PREVIOUS

About

A Fantasy Computer using Forth as its system language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published