Browse Search Popular Register Upload Rules User list Login:
Search:
Algodoo BASIC - AHOX Lithium PC

Image:
screenshot of the scene

Author: Little

Group: Default

Filesize: 178.35 kB

Date added: 2023-05-26

Rating: 6.1

Downloads: 11328

Views: 1216

Comments: 35

Ratings: 3

Times favored: 1

Made with: Algodoo v2.1.0

Tags:

Scene tag

This is a scene me and some of my friends have been working on for a couple of months now.

This computer is a full-blown BASIC interpreter!
It runs a special in-house dialect of BASIC known as AHOX Basic.

For those of you who don't know what BASIC is, it is an ancient family of high-level languages for hobby-grade computers that was popular in the 70s and 80s.

AHOX Basic is heavily inspired by Microsoft BASIC, the type of BASIC that ran on the 8-bit Commodore machines. (PET, VIC-20, 64, etc)

It has its fair share of differences from Microsoft BASIC or any other BASIC dialect, and as such there is a programming manual along with sample programs in the scene.

The computer has a built-in text editor, however it's inconvenient to use because it was built to tailor around the fact that we can't use the space bar.

The computer comes with a BASIC interpreter, some settings, and a basic IDE (no pun intended!).



While the computer does come with an IDE, I recommend that, for writing programs, you use an external text editor. To do this you can take a BDisk and move the cover to the back layer. The filament should be exposed and you can manually edit the text in another program like Notepad++. Once you are done writing your program, simply move the cover back to the front layer.

I have conveniently grouped the cover's objects to make this process easier. I regret not doing this on my previous computers' disks, however it's better late than never.

To use the computer itself is quite straightforward and is similar to my older Algodoo computers, although being a more complex computer this computer has a couple more tricks up its sleeve.


When you start the scene, the computer should have a green light on and a BDisk titled "Lithium Manual" inserted.

This green light is the power button. Clicking it will toggle the computer's power, and its current color determines the state of the system - Solid green means it's up and running!

The light next to the power button is just the disk activity light. It's not very important, it's primarily there for realism and decoration, much like the fan.

Unlike my previous computers, the disks to this computer only have 1 filament in them, so inserting them either way into the disk slot will work. Hooray!



Just a random fun fact by the way - I was originally planning to make the text colored! I tried it using markup, however updating the screen soon became very laggy if a lot was onscreen.

By the looks of things this is an issue on Algodoo's end - I have used diagnostic tools (the numpad - key) and I noticed that Algodoo was lagging because it was attempting to draw the text, and not because it was trying to run my poorly optimized code.

That's obviously not to say the computer isn't laggy - my code is nowhere near perfect.:P

Alright. This scene was a thrill to make, and I seriously hope you enjoy it.

There's further instructions, including a programming manual and a rundown of how the processor works in the scene.

Also a quick warning: The amount of text in this scene has caused Algodoo to run out of memory for me a few times.
I recommend that you remove disks after you have used them or don't plan to use them again.

As well, you can save the contents of the Ab Manual disk in a text editor to get it out of Algodoo as it's 11KB.

2009 - 2023 AHOX
If you reupload this scene or parts of it, please provide credit to AHOX and Little.

UPDATE: Fixed a bug in BoltOS and removed clouds
Last edited at 2023/05/26 18:58:12 by Little
Please log in to rate this scene
edit
Similar scenes
Title: Programs for the AHOX Basic Computers.
Rating: 5.625
Filesize: 33.58 kB
Downloads: 402
Comments: 5
Ratings: 2
Date added: 2024/04/21 17:21:55
Made with: Algodoo v2.2.3
Rating: rated 5.6
download
Title: AHOX Project Jinx
Rating: 5
Filesize: 262.33 kB
Downloads: 316
Comments: 8
Ratings: 1
Date added: 2024/04/12 16:12:48
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: AHOX Programmable PC with Driver floppy and Computer Car Chassis
Rating: 5.625
Filesize: 43.95 kB
Downloads: 889
Comments: 5
Ratings: 2
Date added: 2010/08/29 15:43:12
Made with: Algodoo before v1.8.5
Rating: rated 5.6
download
Title: Proving that converting X-disks is hard
Rating: 5
Filesize: 137.81 kB
Downloads: 698
Comments: 9
Ratings: 1
Date added: 2024/02/22 17:54:51
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: House with AHOX Light Bulbs (Algodoo Only)
Rating: 4.7
Filesize: 248.38 kB
Downloads: 1223
Comments: 0
Ratings: 4
Date added: 2009/09/25 01:57:42
Made with: Algodoo before v1.8.5
Rating: rated 4.7
download
Title: Lithium Atom
Rating: 5
Filesize: 6.59 kB
Downloads: 574
Comments: 0
Ratings: 1
Date added: 2011/08/10 16:49:26
Made with: Algodoo v1.8.5
Rating: rated 5
download
Comment page previous | 1 2 | next
I also created a program showing an example of split():
10 print "Type in a word and I, the program, will say it's first word!"
20 input b ">_"
30 let a = split(b, " ")
40 let res = a(0)
50 print "The first word is '"res"'."
60 stop
When running, this should be how it looks:

Type in a word and I, the program, will say it's first word! (mistake here)
>_hello world
The first word is 'hello'.
no programming mistake, justa grammar mistake on the "print" opcode.
I have bad news.

I have just found a giant bug in this computer that would unfortunately severely compromise performance to fix!

Basically, lookup functions like the ones that look up variables use the regular "for" function and thus have a pretty shallow limit. If you have too many variables, they will stop working!

I am currently working on the next AHOX computer and I encountered this bug and fixed it by replacing these fors with xFor, but now performance has been compromised.

Can anyone help? :(

EDIT: It's okay now!
I optimized something else I was putting off until later and it's even faster than the Lithium was now.
That's the one benefit of having messy code, I suppose! :lol:
Last edited at 2024/04/16 22:29:10 by Little
idk how it works:(
Comment page previous | 1 2 | next