flat assembler
Message board for the users of flat assembler.

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

Goto page Previous  1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18198
Location: In your JS exploiting you and your system
revolution
filox wrote:
Sorry but where i can find sources of Hobbybasic?
Have a look at the first post in this thread.
Post 21 Oct 2016, 12:13
View user's profile Send private message Visit poster's website Reply with quote
system error



Joined: 01 Sep 2013
Posts: 670
system error
This is good. Keep it coming, bro!
Post 22 Oct 2016, 13:32
View user's profile Send private message Reply with quote
filox



Joined: 13 Feb 2013
Posts: 11
filox
revolution wrote:
filox wrote:
Sorry but where i can find sources of Hobbybasic?
Have a look at the first post in this thread.


No source, only EXE and Demo.bas
Post 26 Oct 2016, 12:24
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 9920
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep
hi filox,
you could try pm picnic for source etc
Post 26 Oct 2016, 12:36
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1298
Location: Paradise Falls
Picnic
Hi filox, the source is not available, at least not yet. Hobby Basic has still some way to go. I want to extend the command list, find methods to make the intepreter faster, add features like user procedures with parameters and local variables and some other ideas i have. This is done somewhat slowly, the only days i can steal some time to work are the weekends.
Post 26 Oct 2016, 13:37
View user's profile Send private message Reply with quote
filox



Joined: 13 Feb 2013
Posts: 11
filox
Picnic wrote:
Hi filox, the source is not available, at least not yet. Hobby Basic has still some way to go. I want to extend the command list, find methods to make the intepreter faster, add features like user procedures with parameters and local variables and some other ideas i have. This is done somewhat slowly, the only days i can steal some time to work are the weekends.


Hi picnic, if u can share code with us, we can help you possibly to improve it faster and i'm interested in it for educational scope Very Happy
Post 18 Nov 2016, 13:19
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1298
Location: Paradise Falls
Picnic
I have uploaded a new version with minor improvements and bug fixes.

Hobby Basic Version 0.7.9

Various predefined paths and variables of Hobby Basic. See README for more information.

Image


Last edited by Picnic on 11 Jul 2021, 00:09; edited 23 times in total
Post 21 Nov 2016, 15:50
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1298
Location: Paradise Falls
Picnic
I have uploaded a new version with minor improvements and bug fixes.

Hobby Basic Version 0.8.0

Α C64-like screen in Hobby Basic console (Windows 7 example).

Code:

    title 'CBM 64'

    dim temp[16]

    dim msg$[4]=\
        'DIE 16 FARBEN DES COMMODORE 64',\
        '**** COMMODORE 64 BASIC V2 ****',\
        '64K RAM SYSTEM  38911 BASIC BYTES FREE',\
        'READY.'

    dim cbm[16]=\
        0x000000,0xFFFFFF,0x404A92,0xCCC584,0xB65193,0x4BB172,0xAA3A48,0x7CDFD5,\
        0x2D6999,0x005267,0x7881C1,0x606060,0x8A8A8A,0x91ECB3,0xDE7A86,0xB3B3B3

    color -1,-1
    push V0,V1

    for i=0 to 15
        rgbc i,-1
        temp[i]=V0
        rgbc i,cbm[i]
    next

    screen 48,31
    cursor 0,0
    cls

    color 14,14
    cls

    color 6,14
    paint 4,3,40,25,-1,1

    at 8,4,msg$[1]
    at 5,6,msg$[2]
    at 4,8,msg$[3]

    for i=0 to 15
        pen i
        erase 4,9+i,40,'█',1
    next

    pen 14

    at 9,26,msg$[0]

    inkey

    for i=0 to 15
        rgbc i,temp[i]
    next

    pop V1,V0
    color V0,V1

    cls : end
    

Image


Last edited by Picnic on 11 Jul 2021, 00:10; edited 71 times in total
Post 21 Dec 2016, 12:34
View user's profile Send private message Reply with quote
avcaballero



Joined: 02 Feb 2004
Posts: 202
Location: Madrid - Spain
avcaballero
Hello, it is very interesting. I was very fond of qbasic. I'd just say that it would be nice to see your page in English, Greek is a bit hard for me Smile
Post 21 Dec 2016, 13:20
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1298
Location: Paradise Falls
Picnic
I have uploaded a new version with minor improvements and bug fixes.

Hobby Basic Version 0.9.7

A set of functions is now available for sending UDP messages across the network to a remote host Server-Client examples are included.

P2P Drawing via UDP sockets in the console, example added.

The changes appearing in real time between the 2 computers.

Image


Last edited by Picnic on 11 Jul 2021, 00:11; edited 43 times in total
Post 28 May 2018, 13:49
View user's profile Send private message Reply with quote
Robocod



Joined: 05 Mar 2018
Posts: 15
Robocod
Source code?
Post 19 Dec 2018, 21:23
View user's profile Send private message Reply with quote
sts-q



Joined: 29 Nov 2018
Posts: 44
sts-q
Post 20 Dec 2018, 09:33
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1298
Location: Paradise Falls
Picnic
I have uploaded a new version with minor improvements and bug fixes.

Hobby Basic Version 1.0.5

A Xonix like game written in Hobby Basic.

Image


Last edited by Picnic on 11 Jul 2021, 00:11; edited 15 times in total
Post 05 Mar 2020, 09:56
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1298
Location: Paradise Falls
Picnic
I have uploaded a new version with minor improvements and (not so minor) bug fixes.

Hobby Basic Version 1.0.6

Introducing Text Draw, a simple ASCII design program for the Windows console written in Hobby Basic.

(If someone could run the program in a Windows 10 environment and confirm that the mouse is working, I would appreciate it. I had some minor issues with Windows 10, I made some corrections and changes, but i haven't tested them, since I don't have often access to Windows 10).

Image


Last edited by Picnic on 06 Jul 2021, 13:27; edited 14 times in total
Post 22 May 2020, 13:13
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3301
Location: vpcmipstrm
bitRAKE
I think I ran all of them on Windows 10.

About the mouse one: didn't indicate which button was double-clicked, and the middle button displays as the left button. This might be a limitation of the API - I don't know.

I did find an error in the XONIX game. I was able to meet the edge at the same time as the red spot. This causes the area not to be filled until I completed another closing move. This typically is just a "one-off" error.

Also, an error in DRAW.BAS, line 336, changed to "if p > 269 then break", and it seems to work.

Was only missing 1200 baud modem sounds. Very Happy
Well done!

_________________
¯\(°_o)/¯ unlicense.org
Post 22 May 2020, 15:05
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1298
Location: Paradise Falls
Picnic
Thanks for taking the time running the examples bitRAKE, i appreciate that.

Quote:
This might be a limitation of the API - I don't know.

I think i have to update my code a bit. The interpreter using the same mouse routine since 2015.

Quote:
Also, an error in DRAW.BAS, line 336, changed to "if p > 269 then break", and it seems to work.

Out of range!, i missed that, it's better this way.
Code:

    if p > SIZE(charset[])-1 then break
    

Quote:
I did find an error in the XONIX game. I was able to meet the edge at the same time as the red spot. This causes the area not to be filled until I completed another closing move. This typically is just a "one-off" error.

Oh come on now, how fast did you notice that. A true game tester Wink
Post 22 May 2020, 20:51
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3301
Location: vpcmipstrm
bitRAKE
Another oddity is not being able to select a character from the codepage that characters are displayed with. The saved images display correctly, but limited character selection as seen in the picture. I was even able to crash the console by selecting different fonts. Windows 10 might be to blame here as they try to push everyone to Powershell.

Putting this in a batch file will compile all the examples:
Code:
FOR %%G IN (.\EXAMPLES\*.BAS) DO (HB "%%G" -bind ".\BIN\%%~nG.EXE")    
...assuming the batch file is with HB.EXE and a directory .\BIN\ has been created. Change the double "%%" to a single "%" to run the command directly at the prompt.


Description:
Filesize: 67.03 KB
Viewed: 7526 Time(s)

HB10win.PNG



_________________
¯\(°_o)/¯ unlicense.org
Post 23 May 2020, 05:21
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1298
Location: Paradise Falls
Picnic
Quote:
Windows 10 might be to blame here as they try to push everyone to Powershell.

I see it with the test programs I write. Some, while running smoothly on previous windows versions, behave differently in windows 10, even in the legacy console mode.

Quote:
Putting this in a batch file will compile all the examples:
Code:
FOR %%G IN (.\EXAMPLES\*.BAS) DO (HB "%%G" -bind ".\BIN\%%~nG.EXE")    
...assuming the batch file is with HB.EXE and a directory .\BIN\ has been created. Change the double "%%" to a single "%" to run the command directly at the prompt.

I can do it through HB as well. Something like...

Code:

    alert  (0x4|0x20),"","Do you want to compile all the examples?"
    if V0 = 6
        exec "if not exist BIN\NUL md BIN"
        exec "FOR %G IN (.\EXAMPLES\*.BAS) DO (HB ""%G"" -bind "".\BIN\%~nG.EXE"")"
    endif
    


Thanks again bitRAKE.


Last edited by Picnic on 06 Jul 2021, 13:45; edited 1 time in total
Post 23 May 2020, 13:13
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1298
Location: Paradise Falls
Picnic
I have uploaded a new version with minor improvements and bug fixes.

Hobby Basic Vesion 1.1.1

The PRINT AT command can display text while retaining the background color of empty cells.

Code:

    rem  HELLO.BAS
    rem  Hobby Basic Interpreter

    screen 80,25,300
    color 0,0
    cls

    for n = 0 to 7
        color n,0
        paint n*10,0,10,25,-1,-1
    next

    for n = 1 to 15
        pen n
        print at n,n,'Hobby Basic'
    next

    inkey

    cls : end
    

Image



A snake game has included in the examples. It takes advantage of this new ability of the interpreter.

Image


Hobby Basic can execute a program located on a remote server directly from the command line.
Code:

    HB.exe https://sites.google.com/site/hobbybasicfiles/TEST.BAS
    

Image


Last edited by Picnic on 11 Jul 2021, 00:13; edited 12 times in total
Post 19 Jan 2021, 12:47
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 9920
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep

this feature sounds exciting and dangerous at the same time,
Post 19 Jan 2021, 17:05
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4  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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.