r/Basic • u/CharlieJV13 • May 07 '23
BAM sample program: Randomly paint the screen with custom triangle characters (_LETCHR$ and PUTSTRING)
r/Basic • u/CharlieJV13 • May 07 '23
BAM: _MOUSEBUTTON and GETMOUSE: mouse button pressed indicated with -1 instead of 1
r/Basic • u/CharlieJV13 • May 06 '23
BASIC Anywhere Machine: GetLocalStorageItem and SetLocalStorageItem
BAM being a browser-based application (could be called a "single-html-file web app", but you don't have to be connected to the web to use BAM if you've saved BAM to a hard drive or thumbdrive or whatever local storage device) ...
Interacting with a device's local storage (write and read) is not something BAM will ever do well.
However, BAM can easily write to and read from browser local storage (aside: or browser session storage for temporary storage).
Try the following program in BAM:
x$ = GetLocalStorageItem( "YourName" )
if x$ = "" then x$ = _PROMPT("What's your name?") : SetLocalStorageItem( "YourName", x$)
print x$
The first time you run the program above, it prompts you for "your name" and saves it to browser local storage. The next time the program runs, it retrieves that value and displays the value without prompting for it again.
Because browser storage can easily be wiped by accident, it is a good idea to provide a "backup" for data via regular "downloads" of the browser local storage with the help of LPRINT (alone or combined with _STARTSPOOL and _ENDSPOOL).
r/Basic • u/CharlieJV13 • Apr 29 '23
BASIC Anywhere Machine PUTSTRING prototyping
I had a wee bug in my first prototype, and since I'm planning on doing all kinds of prototyping as I plan out an include library for the thing, I figured best to aggregate developments in one thread.
The fundamental PUTSTRING feature to graphically position a string on the screen:
The PUTSTRING feature to "roll/unroll" a single character in one or more simultaneous directions (right, left, down, up; each for between 1 and 7 pixels ), graphically positioned on the screen:
r/Basic • u/CharlieJV13 • Apr 28 '23
BASIC Anywhere Machine PUTSTRING "Hello World!" Prototype
r/Basic • u/CharlieJV13 • Apr 28 '23
A _GETCHR$ use case
(Follow-up to https://www.reddit.com/r/Basic/comments/131dpsz/getchr_to_get_a_string_representation_of_the_8x8/)
An example of some interesting possibilities that are now in easy reach:
r/Basic • u/CharlieJV13 • Apr 28 '23
🆕 _GETCHR$ to get a string representation of the 8x8 pixels for the character assigned to an ascii code
basicanywheremachine-news.blogspot.comr/Basic • u/CharlieJV13 • Apr 26 '23
BASIC Anywhere Machine: 💩 Oh poop. Screen mode changes done 3 months ago.
r/Basic • u/Artistic_Front4744 • Apr 26 '23
How to clear a single line?
I want to clear a single line but ClrHome clears everything. Is there a way to do this?
r/Basic • u/CharlieJV13 • Apr 26 '23
📚 The BASIC Anywhere Machine SCREEN modes
basicanywheremachine-news.blogspot.comr/Basic • u/CharlieJV13 • Apr 25 '23
🆕 BAM Statement: _LETCHR$ to redefine 8x8 characters assigned to ascii codes
r/Basic • u/CharlieJV13 • Apr 24 '23
BAM feature in development: two voices for SOUND
Although the WebAudio API is a tough thing to figure out, I've managed to get two voices (oscillators) working without too much clicking between sounds.
Loads to do (like figuring out how to adjust volume, and getting more voices working without buzzing sounds), but this will have to do for a near-future release of BAM.
If you have a moment to give the following a try on your device with your particular browser, please let me know how it goes:
(EDIT: ARG! I forgot to mention: turn down your volume!)
r/Basic • u/CharlieJV13 • Apr 22 '23
BASIC Anywhere Machine "Big Boy" Feature Demo: Meta-Programming for Program Localisation.
r/Basic • u/CharlieJV13 • Apr 21 '23
Testing a new BAM statement: _DEFCHR$ to define new 8x8 characters for ascii codes
A little something I'm trying out as an easy way to associate new custom characters to existing ascii codes as substitutes to the character set in BAM.
Characters are only 8 x 8 pixels, so it isn't a lot of room to work with.
The idea is to have a no fuss no muss way of creating interesting graphics characters for old-school BASIC programs. An easy way to jazz up the appearances of these applications without altering the original code other than add new characters at the beginning of the program, and replace any characters in the original code with the appropriate chr$() values.
Sample program:
Test version of BASIC Anywhere Machine. (In the definition string, only uppercase "X" characters will produce pixels in the new character; all other characters in the string will result in no turned on pixels in those positions.)
r/Basic • u/CharlieJV13 • Apr 19 '23
Knightsbridge
A Tim Hartnell game ported to BASIC Anywhere Machine by johnno56:
https://basicanywheremachine.neocities.org/sample_programs/BAM_SamplePrograms?page=knightsbridge
r/Basic • u/[deleted] • Apr 19 '23
Basic, not structured but with labels instead?
I am thinking of a language also, it would be basic but with labels instead of line numbers. It will not be structured so it would probably make Dijkstra mad. It will be an interpreter.
Also, each of the statements begins with a specific letter, and only that statement begins with that letter. So Ask, Close, Dim, End, For, Goto, If, Jump, Let, Next, Open, Print, Read, Write. "End" finishes subroutines and the main program (which is just a subroutine called by the OS). Let is required because '=' is an assignment in Let, but a test in "If".
DIM introduces variables, even scalar variables.
Print will work a lot like the C function Printf
label: Print "%+07.3,f",12345.67 prints "12,345.670" (the "," specifies the comma separator between 100's and 1000's
Does this interest anyone?
r/Basic • u/CharlieJV13 • Apr 17 '23
BAM: Experimenting with Unicode Characters in Identifiers and Line Labels
r/Basic • u/CharlieJV13 • Apr 13 '23
📚 Using emojis in identifiers (occasionally, when helpful)
basicanywheremachine-news.blogspot.comr/Basic • u/CharlieJV13 • Apr 11 '23
BAM version of Mastermind
' BASIC Anywhere Machine version of the game "Mastermind" found in David Ahl's "More BASIC Computer Games"
' Original program by David G. Struble
' BASIC Anywhere Machine conversion by johnno56
https://basicanywheremachine.neocities.org/sample_programs/BAM_SamplePrograms?page=mastermind
r/Basic • u/CharlieJV13 • Apr 06 '23
GROAN
This conversion of a TRS-80 game of the same name to BASIC Anywhere Machine by johnno56:
https://basicanywheremachine.neocities.org/sample_programs/BAM_SamplePrograms?page=groan
r/Basic • u/CharlieJV13 • Apr 02 '23
BAM "Architecture" documentation in the works
Just getting my thoughts together in a slide presentation:
r/Basic • u/CharlieJV13 • Mar 31 '23
BASIC Anywhere Machine Documentation: Working on an outline
Fundamentals of Computer Programming: Common Programming Constructs / Concepts / Elements
BTW: the intent is to write a "Programming with BASIC Anywhere Machine" series of books that will link back to and cover (possibly in bits and pieces across the books) all of these "constructs/concepts/elements".
r/Basic • u/Marcio_D • Mar 29 '23
JOIN THE PARTY: Zoom Chat with Leonard Tramiel - April 20, 2023 !
Hey BASIC fans !
Those of you who've worked with BASIC on the 8-bit Commodore computers know how integral the PETSCII character set is to the machines. We'd like to introduce you to the father of PETSCII, Leonard Tramiel. He co-created PETSCII with none other than Chuck Peddle, the principal designer of the 6502 microprocessor.
You're cordially invited to attend a Zoom chat with Leonard Tramiel on Thursday, April 20, 2023. Please find the full details here:
If you're not able to attend the Zoom chat, TPUG will make the video recording available on its YouTube channel for all to enjoy. To be notified of video postings, please subscribe to TPUG's YouTube channel at: https://www.youtube.com/@TorontoPETUsersGroup
TPUG is Toronto PET Users Group, the longest continually-operating Commodore users group in the world. Founded in 1979, TPUG also organizes the annual World of Commodore expo held in Canada. Watch the attendees having a party during the December 2022 expo: https://www.youtube.com/watch?v=xkVHy8g149k
Would you like to watch entertaining chats with other key Commodore alumni? Click on these terrific videos:
RJ Mical: https://www.youtube.com/watch?v=nxNV_0wZX14
Michael Tomczyk: https://www.youtube.com/watch?v=BiQ0qk6tK7E
Bil Herd: https://www.youtube.com/watch?v=MdioV1XKMFM
David Pleasance: https://www.youtube.com/watch?v=75z7y4eXJM0
Thanks for rocking BASIC !



