Wednesday, December 27, 2023

🖥 Mouse Tester program

A little program primarily to test/demonstrate mouse-click handling and mouse-wheel handling.

Also demonstrated:
  • SCREEN _NEWIMAGE (to setup custom screen size for the specified mode)
  • CIRCLE
  • PAINT
  • PRESET
  • IFF
  • FOR NEXT
  • _DISPLAY (forces refresh of the screen; otherwise, the browser page locks up, going into an infinite loop)
  • XMAX and YMAX



Sunday, December 24, 2023

🖥 VC2023 Logiker

"Logiker" has a "Vintage Computing Christmas Challenge 2023" event aimed primarily at vintage computers.

I saw this is a fun coding exercise to do in a "Vintage Computer BASIC" style.




Saturday, December 23, 2023

🖥 GOTO Tester (Enhancements in the works)

(As of this writing, these are changes that exist only in the development version of BAM.)

Summary of enhancements to GOTO

  • ignore leading zeroes in line numbers
    • (this is a change to referenced line numbers referenced in GOTO statements and to declared line numbers (i.e. line numbers at the start of lines)
  • new "EVAL clause"
    • (can be used to evaluate either line numbers or line labels)

The test program

🖥 Which Weekday (Port and mod of an "80's BASIC" program)

Carlos Mencia shared a nice little "80's BASIC" program that takes an input date (day, month, year values) and returns the related weekday.  (See this Facebook post.)

Although this BAM port is a significant mod, you'll find the all-important smarts of the program left untouched.  This wee porting/modding task demonstrates one way of giving some good old BASIC code a new lease on life as a browser-based BASIC program, stored locally or hosted on the web, that should run on pretty much any modern device (even touch screen).





Wednesday, December 20, 2023

Monday, December 18, 2023

📚 Syntax for Line Numbers



Although leading zeroes are allowed in line numbers if desired, leading zeroes are ignored by BAM when the line numbers are referenced/resolved by statements:
  • GOTO and ON..GOTO
  • GOSUB and ON..GOSUB
  • RESTORE and ON...RESTORE
So the following all refer to the line "123": 123, 0123, 00123, 000123










Saturday, December 16, 2023

🖥 Festive Skull (A SpecBAS to GW-BASIC to BAM port and mod)

ron77 ported ZXDunny's skull program from SpecBAS to GW-BASIC.

At first, I ported ron77's program with no changes except for some things that BAM does not support:

  • DEF FN function identifiers that are the same as identifiers for variables
  • Array identifiers that are the same as identifiers for variables
Once I got that working in no time at all, I decided to make the following changes to the BAM version:
  • screen mode 23 for rgb colours
  • random colours
  • infinite loop to generate a new skull for every loop
  • animation: transitions between skulls (a skull is displayed for about 3 seconds before the transition to a new skull
The program's source code needs some refactoring to get it to my liking, but Saturday's Hockey Night in Canada is starting, so no more BASIC programming for this kid.

Festive Skull:


🖥 Ardi's Graph

A port and mod of a program shared by Ardi Ardi with the "BASIC Programming Language" Facebook group via this post . This program ...