dmsc / fastbasic

FastBasic - Fast BASIC interpreter for the Atari 8-bit computers
GNU General Public License v2.0
139 stars 20 forks source link

Improvements to DLI ... INTO -- Read from address, simple math operations #60

Open billkendrick opened 1 year ago

billkendrick commented 1 year ago

A common Atari trick is the rainbow color effect, which simply plugs the VCOUNT ($D40B) register into a color register, perhaps applying a counter (e.g., the faster RTCLOK register ($14)) to make it animated.

It would be nice to be able to DLI <addr> INTO <addr>, and perhaps do some simple math, e.g. for rainbow effect: DLI (&$D40B + &$14) INTO $D01A.

Operators like binary AND and OR would be useful as well. e.g., for a 'water' effect, the colors could animate within only the blue hues -- $80 through $8F -- like so: DLI (((&$D40B + &$14) & $0F) | $80) INTO $D01A or DLI (((&$D40B + &$14) & $0F) + $80) INTO $D01A.