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, 5  Next
Author
Thread Post new topic Reply to topic
MajorDill



Joined: 01 Nov 2010
Posts: 22
MajorDill 26 Apr 2014, 18:04
when I click on download nothing is there. Just learning fasm and could really use these examples.

begging somebody to repost them

thankyou
Post 26 Apr 2014, 18:04
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 26 Apr 2014, 21:40
Hi MajorDill,

Sorry about this. I'm building my website but it will take me longer than expected. See the 1st post.


Last edited by Picnic on 29 Aug 2014, 19:32; edited 2 times in total
Post 26 Apr 2014, 21:40
View user's profile Send private message Visit poster's website Reply with quote
MajorDill



Joined: 01 Nov 2010
Posts: 22
MajorDill 28 Apr 2014, 14:01
got it - thanks
Post 28 Apr 2014, 14:01
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 31 Jul 2015, 06:16
I have uploaded a new version with minor improvements and bug fixes.

Xs and Os game for the console (plays with mouse).

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 11 Jul 2024, 23:44; edited 89 times in total
Post 31 Jul 2015, 06:16
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 555
fasmnewbie 01 Aug 2015, 02:54
I love this stuff. Excellent materials for beginners to learn from (although there's nothing 'beginners' with the code)
Post 01 Aug 2015, 02:54
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 555
fasmnewbie 01 Aug 2015, 03:10
I am linking to this thread.
Post 01 Aug 2015, 03:10
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 02 Aug 2015, 11:15
@fasmnewbie thank you.

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

Hobby BASIC handles ANSI encoding graphics with ease.
Loading an ANSI encoded text file in the console is a very simple process.
Code:

    !  APPLE1.BAS
    !  Hobby BASIC Interpreter

    !  Displays an ANSI encoded text file

    path$ = PATH('MEDIA\ANSI\APPLE.ANS')
    if SIZE(path$) = -1 then alert 0,'Not found',path$ : end

    view 11
    screen 80,25,0
    cursor 0
    color 0,7
    cls

    ansi path$

    inkey

    cls
    end
    

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 14 Sep 2024, 15:42; edited 66 times in total
Post 02 Aug 2015, 11:15
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 12 Aug 2015, 09:43
I have uploaded a new version with minor improvements and bug fixes.

Hobby BASIC comes with a set of specialized console commands.
Code:

    !  APPLE2.BAS
    !  Hobby BASIC Interpreter

    !  Replaces colors on a rectangular area of the screen

    path$ = PATH('MEDIA\ANSI\APPLE.ANS')
    if SIZE(path$) = -1 then alert 0,'Not found',path$ : end

    BLACK = 0
    BLUE = 1
    BRIGHT_BLUE = 9

    A = 700
    B = 701

    view 11
    screen 80,25,0
    cursor 0
    color 0,7
    cls

    ansi path$

    wait 750

    repaint 0,0,80,25,BLUE,BLACK
    repaint 0,0,80,25,BRIGHT_BLUE,BLACK

    wait 750

    bsave 0,0,40,25,A
    bsave 40,0,40,25,B

    bload 0,0,B
    bload 40,0,A

    inkey

    cls
    end
    

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 14 Sep 2024, 15:43; edited 64 times in total
Post 12 Aug 2015, 09:43
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 555
fasmnewbie 12 Aug 2015, 12:43
Picnic

It would be very nice if you could share your passion with Tomasz and others at Programming Language & Design section where you can properly introduce your Hobby Basic to the community. Good to see FASM is becoming a language of choice for compiler writing.
Post 12 Aug 2015, 12:43
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 15 Aug 2015, 22:13
@fasmnewbie I feel it's still early for that.
The interpreter is far for being complete.
Surely i might do that, but in later time.

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

A new example 'APPLE3.BAS' demonstrates how to randomly shuffle the console screen.

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 11 Jul 2024, 23:44; edited 46 times in total
Post 15 Aug 2015, 22:13
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 03 Sep 2015, 14:45
I have uploaded a new version with minor improvements and bug fixes.

Hobby BASIC console version of the 2048 web game.

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 11 Jul 2024, 23:44; edited 58 times in total
Post 03 Sep 2015, 14:45
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 09 Oct 2015, 06:27
I have uploaded a new version with minor improvements and bug fixes.

Replacing color 12 (bright blue) with color 13 (bright purple) at a specific area of the screen using the REPAINT command.
Code:

        X=0
        Y=0
        COLS=40
        ROWS=25

        VIEW 11
        SCREEN 80,25:CLS
        ANSI 'MEDIA\ANSI\APPLE.ANS'
        REPAINT X,Y,COLS,ROWS,12,13
        INKEY
        CLS
    

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 11 Jul 2024, 23:44; edited 69 times in total
Post 09 Oct 2015, 06:27
View user's profile Send private message Visit poster's website Reply with quote
SergeASM



Joined: 13 Nov 2015
Posts: 21
SergeASM 20 Nov 2015, 10:21
In the file Console.asm I see "Copyright © 2013-2015, Nick Kouvaris". Is this the same Nick Kouvaris, which did flash games on lightforce.freestuff.gr?

Serge
Post 20 Nov 2015, 10:21
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 20 Nov 2015, 11:34
Hi SergeASM,

Yes that's me, nice of you to ask.
Post 20 Nov 2015, 11:34
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 11 May 2016, 11:08
I have uploaded a new version with minor improvements and bug fixes.

An ANSI Encoding Text File Viewer for the Windows console written in Hobby BASIC.

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 11 Jul 2024, 23:45; edited 59 times in total
Post 11 May 2016, 11:08
View user's profile Send private message Visit poster's website Reply with quote
redrum88



Joined: 30 Mar 2016
Posts: 6
redrum88 19 May 2016, 00:25
Very nice, thanks!
Post 19 May 2016, 00:25
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 14 Jun 2016, 10:08
I have uploaded a new version with minor improvements and bug fixes.

2D Side Movement in the console. Use the Arrow keys to move the sprite.

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 11 Jul 2024, 23:45; edited 63 times in total
Post 14 Jun 2016, 10:08
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 07 Aug 2016, 09:10
I have uploaded a new version with minor improvements and bug fixes.

2D Scrolling Background in the console.
Use the Arrow keys to move the sprite.
Press Spacebar to jump.

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 11 Jul 2024, 23:45; edited 67 times in total
Post 07 Aug 2016, 09:10
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1397
Location: Piraeus, Greece
Picnic 21 Oct 2016, 08:41
I have uploaded a new version with minor improvements and bug fixes.

Simple car racing game for the console that uses RGB colors (Windows 7/10).

Image

_________________
Hobby BASIC Interpreter


Last edited by Picnic on 11 Jul 2024, 23:45; edited 42 times in total
Post 21 Oct 2016, 08:41
View user's profile Send private message Visit poster's website Reply with quote
filox



Joined: 13 Feb 2013
Posts: 11
filox 21 Oct 2016, 11:52
Sorry but where i can find sources of Hobbybasic?
Post 21 Oct 2016, 11:52
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, 5  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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.