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
Author
Thread Post new topic Reply to topic
Picnic



Joined: 05 May 2007
Posts: 1292
Location: Paradise Falls
Picnic
I liked the idea and it was relatively easy to add as a feature.
I have not thought about what issues may arise.
sleepsleep you scare me!
Post 19 Jan 2021, 20:39
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17942
Location: In your JS exploiting you and your system
revolution
Running unaudited code directly from the Internet.

Nothing could possibly go wrong. Razz
Post 19 Jan 2021, 22:26
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 897
Location: Belarus
DimonSoft
Guys, please, don’t say a word about JS Smile
Post 20 Jan 2021, 14:21
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1292
Location: Paradise Falls
Picnic
I can't do much at the moment other than leave it as is, or disable it. Smile

There's more, the interpreter can download and run a program located on a remote server from within code also.

Code:

    url$ = 'https://sites.google.com/site/hobbybasicfiles/TEST.BAS'
    

Code:

    load url$,1
    if V0 = -1 then ? 'load error' : end
    run 'TEST.BAS'
    

or even
Code:

    run url$
    


get the source code
Code:

    a$ = GETSRC(url$)
    


Load a remote ANSI file (replace TEST.BAS with APPLE.ANS in url$).
Code:

    if SIZE(url$)=-1 then ? 'URL failed' : end

    screen -1,-1
    if V0<>80 then screen 80,25,300
    cls
    ansi url$
    pause
    cls
    end
    


Version notes:
Although the examples have been tested on various window sizes and color combinations, sometimes setting the console back to its original state (when exit) can be tricky. HB seems to be doing just that quite smoothly now.
Post 22 Jan 2021, 13:12
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

< 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.