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: 1378
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 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: 1378
Location: Piraeus, Greece
Picnic 31 Jul 2015, 06:16
I have uploaded a new version with minor improvements and bug fixes.

Hobby BASIC Version numbering changes from 0.0.4 to 0.4.0.

Xs and Os game for the console (uses the mouse).

Image


Last edited by Picnic on 27 Apr 2022, 07:50; edited 87 times in total
Post 31 Jul 2015, 06:16
View user's profile Send private message 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: 1378
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:

    rem  APPLE1.BAS
    rem  Display an ANSI encoded text file
    rem  Hobby BASIC Interpreter

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

    view 11
    screen 80,25,300
    color 0,0
    cls

    ansi path$

    inkey

    cls
    end
    

Image


Last edited by Picnic on 05 Jan 2023, 11:24; edited 61 times in total
Post 02 Aug 2015, 11:15
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1378
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.

The commands BSAVE/BLOAD are used to copy a specific area of the console screen to a memory block and vice versa.
Code:

    rem  APPLE2.BAS
    rem  Hobby BASIC Interpreter

    BLACK = 0
    BLUE = 1
    BRIGHT_BLUE = 9

    A = 700
    B = 701

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

    view 11
    screen 80,25,300
    color 0,0
    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


Last edited by Picnic on 05 Jan 2023, 11:29; edited 58 times in total
Post 12 Aug 2015, 09:43
View user's profile Send private message 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: 1378
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


Last edited by Picnic on 05 Jan 2023, 11:32; edited 44 times in total
Post 15 Aug 2015, 22:13
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1378
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


Last edited by Picnic on 27 Apr 2022, 07:54; edited 56 times in total
Post 03 Sep 2015, 14:45
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1378
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 'ART\ANSI\APPLE.ANS'
        REPAINT X,Y,COLS,ROWS,12,13
        INKEY
        CLS
    

Image


Last edited by Picnic on 05 Jan 2023, 11:35; edited 66 times in total
Post 09 Oct 2015, 06:27
View user's profile Send private message 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: 1378
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 Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1378
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


Last edited by Picnic on 27 Apr 2022, 07:58; edited 57 times in total
Post 11 May 2016, 11:08
View user's profile Send private message Reply with quote
redrum88



Joined: 30 Mar 2016
Posts: 5
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: 1378
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


Last edited by Picnic on 27 Apr 2022, 07:59; edited 61 times in total
Post 14 Jun 2016, 10:08
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1378
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


Last edited by Picnic on 27 Apr 2022, 08:04; edited 65 times in total
Post 07 Aug 2016, 09:10
View user's profile Send private message Reply with quote
Picnic



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

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

Image


Last edited by Picnic on 27 Apr 2022, 08:04; edited 40 times in total
Post 21 Oct 2016, 08:41
View user's profile Send private message 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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.