Jump to content
IGNORED

FastBasic 4.6 released


Recommended Posts

Hi!

 

After the long beta period, FastBasic version 4.6 is out!

 

Over the last beta, there are many bug-fixes and optimizations, and also there is a new COLOR() function to PRINT, so you can easily alter the text color in graphics modes 1 and 2:

GR.1 : X = 123
? #6, X
? #6, COLOR(32) X+1
? #6, COLOR(128) X+2
? #6, COLOR(160) X+3

This also works in graphics 0, but the only available option is using COLOR(128) to print in inverse video.

 

As always, you can download the ATR, the manual and the cross-compiler from github: https://github.com/dmsc/fastbasic/releases/tag/v4.6 . 

 

This is the full list of changes from version 4.5:

 

FastBasic 4.6: The Atari 5200 release!

A new major feature: now the FastBasic PC compiler can produce Atari 5200 cartridge images.

This version uses a new PC compiler, rewritten to support multiple targets with one binary, you can specify the target with the new option -t:, the available targets are:

  • atari-fp: produces Atari 800 XEX programs, with support for floating-point.
  • atari-int: the old "integer only" version, produces Atari 800 XEX programs that don't use the floating-point package.
  • a5200: produces cartridges for the Atari 5200
  • atari-cart: the same as atari-fp, but producing cartridge images for the Atari 800.
  • atari-cart-int: the same as atari-int, but producing cartridge images for the Atari 800.

Read more about the Atari 5200 port in https://github.com/dmsc/fastbasic/blob/master/a5200.md

New language additions

  • There are now PRINT functions that allows formatting the output for PRINT command:
    • TAB() function, moves to a column multiple of a number.
    • RTAB() function to right-align the next argument to a specified column.
    • COLOR() function to specify the text color (or inverse mode) of the text, see #47.
  • DIM can be used to declare normal variables (like DIM X$, Z), the variables are automatically initialized to 0 or empty strings.
  • DATA statements can be placed in ROM instead of RAM (useful for Atari 800 cartridges or Atari 5200).
  • Allows writing to more than one register in a DLI, see #45

Changes in the runtime

  • The comma in prints now uses the TAB function internally, so it behaves more consistently in screen output (but in a different way that Atari BASIC).
  • MOVE and -MOVE are faster, using code in zero-page.
  • Fixes crash when setting DLI, #49
  • More size optimizations, integer IDE is still less than 8kB of size.

Changes to the cross-compiler

  • Rewritten to allow multiple targets by configuration files.
  • Allows building Windows version native and ports the cross-compiler test-suite to Windows.
  • Prints better compiler error messages.
  • Allows defining symbols for the linker and passing arbitrary arguments.

 

Have Fun!

  • Like 12
  • Thanks 3
Link to comment
Share on other sites

19 minutes ago, dmsc said:

DATA statements can be placed in ROM instead of RAM (useful for Atari 800 cartridges or Atari 5200).

Could data be forced to be stored at a given address in the ROM or be page aligned? For example, charsets have restrictions, and a static splash screen could have both DL and text/image data prebuilt.

 

Link to comment
Share on other sites

Hi!

3 hours ago, vitoco said:

Could data be forced to be stored at a given address in the ROM or be page aligned? For example, charsets have restrictions, and a static splash screen could have both DL and text/image data prebuilt.

 

This is possible, but you need a custom linker config file, and specify a specific section for the DATA. See this example, with the attached config file that adds the "FONT_SEG" segment:

DATA FontData() B. [FONT_SEG] = 1,2,4,8,16,32,64,128,0,127,65,65,65,65,127,0

GR. 1
POKE @CHBASE, ADR(FontData) / 256

? #6," !!!!!"

DO : LOOP

You need to compile with:

fb -t:a5200 font.bas  -C:font.cfg

Have Fun!

 

font.bas font.cfg

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...