flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2, 3 Next |
Author |
|
Hobby Basic is a small language interpreter for the Windows console.
Its syntax resembles BASIC. It's written in fasm + Win32 API. Features BASIC command set (REM,PRINT,INPUT,GOTO,...). Special console commands (GRAB,FLIP,INVERT,INKEY,...). Simple mathematical operations (such as +, -, *, /, %). Data Types: Variable,String,Array. Built-in integer functions (such as ABS,ASC,RND,KEY,...). Built-in string functions (such as LEN,LEFT,MID,TRIM,...) UDP network functions (OPEN,SEND,QUEUE,CLOSE). User-defined functions with parameters set by the user. Embedded ANSI file loader (recognizes standard ANSI.SYS escape codes). Instructions Download HB.zip and uncompress the HB folder into hard drive. To run the accompanying examples, open a command prompt window, navigate to HB folder, type hb examples\filename.bas and hit enter. History 2013 v0.3 - I wrote a 32-bit console library in order to back-end my own programs for the Windows console. 2014 v0.4 - I started building a simple BASIC interpreter around the console library. 2016 v0.6 - Added string and array data types. 2017 v0.7 - Added built-in functions. 2018 v0.8 - Added user-defined functions, UDP functions, ANSI support. 2019 v0.9 - Todo Bug fixes and performance improvements. Show-off Loading an ANSI image in console window. Code: c$="ART\CAR.ANS" cursor 0,0 ansi 0,c$ copy 0,0,32,7 paste 40,7 paste 0,14 flip 40,7,32,7,0 inkey end ![]() Adding a background image. Code: dim c[32,7] a$="ART\FOREST.ANS" c$="ART\CAR.ANS" cursor 0,0 ansi 0,c$ grab 0,0,32,7,c[],0 color 0,0:cls ansi 0,a$ move 0,0,80,15,0,10 grab 0,18,32,7,c[],2 inkey end ![]() 2D Moving Car in console window. Code: dim a[80,15] dim c1[32,7] dim c2[32,7] a$="ART\FOREST.ANS" c$="ART\CAR.ANS" title "Use arrow keys to move" screen 80,30 cursor 0,0 ansi 0,c$ grab 0,0,32,7,c1[],0 flip 0,0,32,7,0 grab 0,0,32,7,c2[],0 color 0,0:cls ansi 0,a$ grab 0,0,80,15,a[],0 color 0,0:cls grab 0,15,80,15,a[],1 grab x,23,32,7,c1[],2 x=2 do if KEY(37) and x>0 grab 0,15,80,15,a[],1 grab x,23,32,7,c2[],2 x=x-2 elseif KEY(39) and x<82 grab 0,15,80,15,a[],1 grab x,23,32,7,c1[],2 x=x+2 endif wait 10000 until KEY(27) end ![]() Last edited by Picnic on 17 Feb 2019, 09:21; edited 124 times in total |
|||
![]() |
|
Great stuff!
Things like that motivate beginners to start programming. |
|||
![]() |
|
I suppose that the author's sentiment to QuickBasic was the main inspiration for this project. Nice thing.
![]() |
|||
![]() |
|
Nice. This prompts me to make a CLI graphics library. Looks pretty neat.
|
|||
![]() |
|
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.
|
|||
![]() |
|
This is very nice.
Reminiscent of DOS apps. Mouse handling would be a nice addition, I think ![]() |
|||
![]() |
|
Stupid post removed.
Last edited by HaHaAnonymous on 28 Feb 2015, 20:54; edited 1 time in total |
|||
![]() |
|
TmX wrote: Mouse handling would be a nice addition, I think Version 0.0.3 mouse handling example added. ![]() Last edited by Picnic on 30 Dec 2013, 21:22; edited 2 times in total |
|||
![]() |
|
Several changes in pilot version 0.0.4, the first that supports unicode characters.
|
|||
![]() |
|
I get this when I run MOUSE
![]() |
|||
![]() |
|
Thanks for the feedback typedef. Can you please tell me your Windows version and if you tried the rest of the samples?
|
|||
![]() |
|
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
|
|||
![]() |
|
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 |
|||
![]() |
|
I see. It's a version difference thing.
|
|||
![]() |
|
I think i found what was causing the trouble. Give it a try if you like typedef.
|
|||
![]() |
|
They work now
![]() |
|||
![]() |
|
Nice to hear!
Sure, it seems that an improper call to SetConsoleOutputCP function crush the program. By the way, i installed Windows 7. |
|||
![]() |
|
Picnic wrote: Nice to hear! Hmm. Nice, what Win7 version? |
|||
![]() |
|
^^Home premium 32-bit.
New gradient example, some minor improvements and bug fixes in version 0.0.5 |
|||
![]() |
|
Goto page 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2019, Tomasz Grysztar.
Powered by rwasa.