flat assembler
Message board for the users of flat assembler.

Index > Examples and Tutorials > Hobby Basic, a toy language interpreter written in fasm

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



Joined: 05 May 2007
Posts: 1281
Location: countryside
Picnic
Image

Hobby Basic is a toy interpreter for the Windows console.
It has a small BASIC-like syntax.
Its implemented in fasm.

Version 0.99.3, November 2019

Download


TV.BAS

This is a simple example program written in Hobby Basic.

Code:

    rem  TV.BAS

    FULL_BLOCK = 0x2588

    dim p[8] = 15, 14, 11, 10, 13, 12, 9, 0

    a$ = "N  O   S  I  G  N  A  L"

    screen 80,25         ! setup screen
    cursor 0,0           ! hide the cursor
    color 0,0            ! set the color attributes
    cls                  ! clear the screen

    for x = 0 to 7
        pen p[x]
        paint x*10,0,10,25,FULL_BLOCK,1
    next x

    erase 17            ! erase line 17
    erase 18            ! erase line 18
    erase 19            ! erase line 19

    pen 15              ! set the text color
    at 25,18,a$         ! print string

    inkey               ! wait for keypress
    end
    

Image


Last edited by Picnic on 04 Dec 2019, 22:07; edited 175 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: 1398
Location: Toronto, Canada
AsmGuru62
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: 6029
Location: Poland
MHajduk
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 Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2914
Location: 0x77760000
typedef
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: 1281
Location: countryside
Picnic
I am glad you like it, i had some concern whether it can be served as an example or tutorial due to the lack of source code.


Last edited by Picnic on 19 Nov 2019, 20:26; edited 11 times in total
Post 07 May 2013, 10:10
View user's profile Send private message Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 820
Location: Jakarta, Indonesia
TmX
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: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


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: 2914
Location: 0x77760000
typedef
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: 1281
Location: countryside
Picnic
TmX wrote:
Mouse handling would be a nice addition, I think Wink


Hobby Basic Version 0.3

I uploaded a new version with minor improvements and bug fixes.

[+] Mouse Support.

Download


Last edited by Picnic on 19 Nov 2019, 21:49; edited 17 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: 1281
Location: countryside
Picnic
I uploaded a new version with minor improvements and bug fixes.

Hobby Basic Version 0.4

Download


Last edited by Picnic on 19 Nov 2019, 21:49; edited 11 times in total
Post 15 Dec 2013, 01:37
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2914
Location: 0x77760000
typedef
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: 1281
Location: countryside
Picnic
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: 2914
Location: 0x77760000
typedef
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: 1281
Location: countryside
Picnic
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: 2914
Location: 0x77760000
typedef
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: 1281
Location: countryside
Picnic
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: 2914
Location: 0x77760000
typedef
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: 1281
Location: countryside
Picnic
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: 2914
Location: 0x77760000
typedef
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: 1281
Location: countryside
Picnic
I uploaded a new version with minor improvements and bug fixes.

Hobby Basic Version 0.5

Download


Last edited by Picnic on 19 Nov 2019, 21:49; edited 10 times in total
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


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.