flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Examples and Tutorials > Hobby Basic, a BASIC-like interpreter for Windows

Goto page 1, 2, 3  Next
Author
Thread Post new topic Reply to topic
Picnic



Joined: 05 May 2007
Posts: 1211
Location: Greece

Hobby Basic, a BASIC-like interpreter for Windows

Image

Hobby Basic (HB) is a small BASIC-like language interpreter, suitable for easy developing programs for the Windows console.
HB was written in 32-bit assembly (fasm), and runs from the Windows command prompt.
It supports UTF-8 encoding, it handles keyboard, mouse, cursor.
It features a simple syntax in the style of BASIC.
HB is written from scratch, it is NOT a modification to an existing language.
HB is just a hobby project.

-- BASIC commands: REM, PRINT, INPUT, GOTO, GOSUB, RETURN, BREAK, END, IF.. THEN..ELSE, FOR.. NEXT, WHILE.. ENDW, DO.. UNTIL
-- Operators: =, <, >, <=, >=, <>, Arithmetic: +, -, *, /, %, MOD, Bitwise (like in C): &, |, ^, <<, >>, Logical (expression): AND, OR, NOT
-- Special console commands: CLS, PRINT AT, PEN, COLOR, CURSOR, ERASE, INKEY, INVERT, LOCATE, MOUSE, PAINT, PEEK, COPY, PASTE, GRAB, FLIP, MOVE, SCREEN, VIEW, TITLE, WAIT, FILE, BITMAP, EXEC, ALERT, TRACE
-- Integer functions: POW, CELL, RND, ABS, KEY, TICK, SIZE, VAL, LEN, ASC, COMP ,FIND
-- String functions: STR ,PAD, TRIM, UCASE, LCASE, LEFT, RIGHT, MID, PATH, BASE, READLN, REPLACE, REVERSE
-- Directives: INCLUDE, FIX
-- 32 bit signed integers -2147483648 to +2147483647, 2D arrays, UTF-8 strings.
-- Keyboard and Mouse supported, labels instead of line numbering.
-- Unicode support (UTF-8 encoding).

DOWNLOAD


Image
Image
Image
Image
Image
Image
Image
Image


Last edited by Picnic on 22 Oct 2017, 09:08; edited 50 times in total
Post 05 May 2013, 21:16
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1386
Location: Toronto, Canada

Great stuff!
Things like that motivate beginners to start programming.
Post 05 May 2013, 22:15
View user's profile Send private message Send e-mail Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 5928
Location: Poland

I suppose that the author's sentiment to QuickBasic was the main inspiration for this project. Nice thing. Smile
Post 05 May 2013, 22:28
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000

Nice. This prompts me to make a CLI graphics library. Looks pretty neat.
Post 07 May 2013, 04:31
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1211
Location: Greece

I am glad you like it, i had some concern whether it can be served as helpful example despite the lack of comments in source.
Post 07 May 2013, 10:10
View user's profile Send private message Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 792
Location: Jakarta, Indonesia

This is very nice.
Reminiscent of DOS apps.

Mouse handling would be a nice addition, I think Wink
Post 07 May 2013, 15:45
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1171
Location: Unknown

Stupid post removed.


Last edited by HaHaAnonymous on 28 Feb 2015, 20:54; edited 1 time in total
Post 07 May 2013, 20:58
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000


Picnic wrote:
I am glad you like it, i had some concern whether it can be served as helpful example despite the lack of comments in source.



If it can be understood then no worries.

Besides not all examples are aimed at beginners.
Post 07 May 2013, 23:30
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1211
Location: Greece


TmX wrote:
Mouse handling would be a nice addition, I think Wink



Version 0.0.3 mouse handling example added. Wink


Last edited by Picnic on 30 Dec 2013, 21:22; edited 2 times in total
Post 18 Aug 2013, 22:52
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1211
Location: Greece

Several changes in pilot version 0.0.4, the first that supports unicode characters.
Post 15 Dec 2013, 01:37
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000

I get this when I run MOUSE

Image
Post 15 Dec 2013, 05:58
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1211
Location: Greece

Thanks for the feedback typedef. Can you please tell me your Windows version and if you tried the rest of the samples?
Post 15 Dec 2013, 10:10
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000

Windows 7 64 bit. Actually all the programs except the binary and the the color ones. And why it says print I don't know
Post 15 Dec 2013, 14:27
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1211
Location: Greece

I will look into the problem as soon as i can. I starting to feel a bit outdated with my windows xp 32-bit.


Last edited by Picnic on 15 Dec 2013, 17:35; edited 1 time in total
Post 15 Dec 2013, 17:28
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000

I see. It's a version difference thing.
Post 15 Dec 2013, 17:34
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1211
Location: Greece

I think i found what was causing the trouble. Give it a try if you like typedef.
Post 18 Dec 2013, 21:33
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000

They work now Very Happy. Care to share what was causing it to say that?
Post 18 Dec 2013, 22:53
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1211
Location: Greece

Nice to hear!
Sure, it seems that an improper call to SetConsoleOutputCP function crush the program. By the way, i installed Windows 7.
Post 19 Dec 2013, 21:09
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000


Picnic wrote:
Nice to hear!
Sure, it seems that an improper call to SetConsoleOutputCP function crush the program. By the way, i installed Windows 7.



Hmm. Nice, what Win7 version?
Post 20 Dec 2013, 01:13
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1211
Location: Greece

^^Home premium 32-bit.

New gradient example, some minor improvements and bug fixes in version 0.0.5
Post 20 Dec 2013, 20:37
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3  Next

< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2017, Tomasz Grysztar.