flat assembler
Message board for the users of flat assembler.
Index
> High Level Languages > OS-independent version of MIKEOS BASIC |
Author |
|
neville 15 Apr 2011, 21:41
I've created an "os-independent" version of Mike Saunders' MIKEOS BASIC interpreter. Then I added an ORG 0100H and embedded some test source code to allow it to run under DOS as a COM program.
MIKEOS BASIC is a well-structured implementation of the good old BASIC programming language which I'm planning to use as a scripting language in my own OS, FAMOS. With some further development it will also provide a high-level programming alternative to my native assembly language IDE (which uses my port of FASM v1.48 to FAMOS). It could be described as a Tiny Integer Basic with some nice features but also some severe limitations. The executable is only 8681 bytes (assembled with fasm 1.66) and it could certainly still be "size optimised" but I prefer to retain the source code's logical structure which makes it very easy to follow and hopefully very easy to develop further. The first thing I want to do is to extend the integers from 16-bit to 32-bit, or maybe by adding some new variable classes, including "LONG_INTEGER". In MIBASIC.ASM I've made fairly minimal changes to Mike Saunders' original code I obtained from http://prdownload.berlios.de/mikeos/mikeos-4.1.1.zip , and I've incorporated directly into the code only those MIKEOS function calls which are actually required to make it independent of MIKEOS. I found the required MIKEOS functions in various sources in the source\features folder from the archive above. The changes include: - added support for source data created using conventional text editors with CRLF line terminations (originally only Unix-style text editors were supported) - commented out the MIKEOS-specific LOAD and SAVE commands Does anybody know if Mike Saunders is on this board? (Of course he should not be confused with Mike Gonta who has recently done a 32-bit PM version of MikeOS, ported to use with his aeBIOS - see http://board.flatassembler.net/topic.php?t=12381 ).
_________________ FAMOS - the first memory operating system |
|||||||||||
15 Apr 2011, 21:41 |
|
bitshifter 15 Apr 2011, 23:21
> Does anybody know if Mike Saunders is on this board?
He is a nasm guy who hangs out at osdev |
|||
15 Apr 2011, 23:21 |
|
Mike Gonta 17 Apr 2011, 19:09
Mike Saunders wrote: That's really cool! I've added a link in the News section of the MikeOS website Last edited by Mike Gonta on 10 Jun 2014, 10:05; edited 1 time in total |
|||
17 Apr 2011, 19:09 |
|
neville 18 Apr 2011, 03:41
@roboman
Even better, use the FILE directive instead of INCLUDE, and create your source using your text editor. Then you don't have to bother with all the DB '....' s around every line. _________________ FAMOS - the first memory operating system |
|||
18 Apr 2011, 03:41 |
|
neville 22 Apr 2011, 21:34
So here's Mike Saunder's BASIC Tron game added to the MIBASIC interpreter as a FILE directive and I've renamed the original MIBASIC source to MIKETRON.ASM. It assembles to 9880 bytes.
Combining roboman's suggestion above, MIKETRON.ASM could be rewritten as just 2 lines: Code: INCLUDE 'MIBASIC.ASM' FILE 'TRON.BAS' MIBASIC now supports program source files created with any text editor, not just Unix-style editors. Note: Mike's original Tron source wouldn't run because it used the command CURSORCHAR but the intepreter expects CURSCHAR. CURSCHAR is also confirmed in the MikeOS documentation.
_________________ FAMOS - the first memory operating system |
|||||||||||
22 Apr 2011, 21:34 |
|
Madis731 25 Apr 2011, 12:50
I think this site has been slashdotted (read: fasmboarded)
http://mikeos.berlios.de/ Doesn't respond |
|||
25 Apr 2011, 12:50 |
|
neville 25 Apr 2011, 20:15
Madis731 wrote: I think this site has been slashdotted (read: fasmboarded) _________________ FAMOS - the first memory operating system |
|||
25 Apr 2011, 20:15 |
|
Madis731 28 Apr 2011, 06:31
Now it works!
Weird that some of my posts have disappeared (rollback?) from yesterday and the day before that. EDIT: Answer found - http://board.flatassembler.net/topic.php?t=12803 |
|||
28 Apr 2011, 06:31 |
|
IanSeyler 03 May 2011, 18:11
|
|||
03 May 2011, 18:11 |
|
neville 04 May 2011, 02:37
Hi Ian
AFAIK Mike Saunders' code has a BSD-like licence so there's no problem to port it anywhere you like. I'm intending to further develop MIBASIC into a useable HLL for FAMOS, so it will be 32-bit but running in a 16-bit flat-real environment. All the best with BareMetal. I'm interested in creating a 64-bit version of FAMOS one day too. Meanwhile I'll have a look at your ethernet code because I would like to eventually have TCP/IP and a simple web browser running in the existing version of FAMOS. _________________ FAMOS - the first memory operating system |
|||
04 May 2011, 02:37 |
|
IanSeyler 11 May 2011, 18:36
Mike OS spawned the creation of BareMetal OS so the system API is pretty similar. I actually contributed a bit of code to Mike OS a while back. I really liked it but wanted something more modern (16-bit real mode vs 64-bit protected mode).
I've gotten it to the point where MIBASIC.ASM compiles and runs on BareMetal OS. Using the inline sample program it correctly does the CLS and PRINT but the INPUT fails with "Error: unknown command". Probably a pointer or something is off. Still working on it. The network code works well. Intel PRO/1000 Gigabit cards are supported and I am also writing a driver for the Realtek 8169/8110 family of Gigabit cards. TCP is on our road-map but it will be quite the undertaking. |
|||
11 May 2011, 18:36 |
|
IanSeyler 27 May 2011, 16:57
The port was a success!
Code is here: http://code.google.com/p/baremetal/source/browse/trunk/programs/mbasic.asm Screenshot here: http://www.cl.ly/769M Is this the first 64-bit BASIC interpreter? -Ian |
|||
27 May 2011, 16:57 |
|
Dex4u 27 May 2011, 19:21
Very cool.
IanSeyler wrote:
The first i have heard of. |
|||
27 May 2011, 19:21 |
|
me239 17 Jul 2011, 22:42
Hey, I ported it to my OS xOS. Now you can specify the BAS file to be run via the CLI. Screenshot of a simple Celsius to Fahrenheit program (no floating point maybe that should be added ):
|
|||
17 Jul 2011, 22:42 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.