|
| im gonna spray some wd-40 on my c++ skills and try to
write a BASIC interpreter to for hpc-pro and greater.
It will be a old basic interpreter with line numbers.
But may add some features like VERY basic http
file retreival functions. |
|
|
|
Administrator H/PC Oracle Posts: | 17,990 |
Location: | United Kingdom | Status: | |
| Oh! wow, I'll beta
I haven't BASIC'd in years. |
|
|
|
H/PC Oracle Posts: | 16,175 |
Location: | Budapest, Hungary | Status: | |
| me neither in school ... 10 years ago... its time to try it again |
|
|
|
| well, the good news and the bad news !
the good news first:
i finally got a console windows to open up !
the bad news:
i started at 7:00 this morning and it took until 3:15 this afternoon to do it.
I realized how much i hate 'real' windows programming espically with EVC.
Activesync is buggy. EVT is buggy. Windows CE is buggy. no wonder there
are not more developers. Yeah it all works sometimes when you get it right
but i imagine alot of people have given up before they figured how !
HPC2000 has no emulator ! hpc pro has one , BUT there is no CMD ! even
though microsoft claims it does. I can write STDIO code it doesnt error,
just does nothing on the emulator !!
So i guess i have to use hpc2000 which will slow down development since
i have to actually run and debug on my HPC. Luckily i active sync over
wireless.
Of course microsoft documentation says nothing about any of this,
if i would have known how easy it was to use the hpc2000 console mode
i would have written tons of utilities by now !!!!!!!!!!!!!!!
Oh the pain, i may have to take a few hour break, and feed my animals
(i farm) then maybe i will start work.
BBL |
|
|
|
H/PC Elder Posts: | 1,712 |
Location: | New Mexico, US | Status: | |
| Keep at it dave! I'm sure many budding and expert BASICers will appreciate it! |
|
|
|
| making slow progress, when i get to where you can type :
10 print "Hello World"
20 goto 40
30 end
40 print "Hello Again"
50 end
and run it i will post a alpha for mips.
so far my interpreter exe size is 4608 bytes |
|
|
|
H/PC Sensei Posts: | 1,330 |
Location: | North of England | Status: | |
| Good luck, Dave. 4608 bytes, eh? Mind you, have you seen what people are doing now with less than 65,536 of 'em on a PC?
Download Prophecy from http://scene.org/awards.php . I still struggle to see how you can fit the amount of data that's in there (3d world, objects, movement ) into that size let alone fit in the code for a software synth, texture generator, renderer, etc. Seriously impressive - check it out if you remember the scene from the old days
|
|
|
|
H/PC Oracle Posts: | 16,175 |
Location: | Budapest, Hungary | Status: | |
| well i was impressed with the 65k ones... then the 256 byte versions didn't seem such a wonder to me somehow.. i could imagine how they fit it into 256 byte. however 65k seemed more difficult |
|
|
|
H/PC Sensei Posts: | 1,330 |
Location: | North of England | Status: | |
| **WARNING: SERIOUSLY OFF TOPIC! **
I used to code for the Amiga, and the first sector contained the boot code which could be rewritten. I managed to fit a small graphic, scroller and sound sample into that space (512 bytes IIRC ). I think it's just one sector, but it might be more...
Doing anything near what those guys are doing with 64k is scarily complex.
And now, back to the basic interpreter |
|
|
|
| BASIC, huh? I used to do a lot of stuff in QBasic for MS-DOS back in middle school. Good times. Have you tried BasiCE? It's moderately OK, but I couldn't use it to make a few of my favorite simple games because it didn't support variable arrays:
10 LET A (1 ) = 4
20 LET A = 0
30 PRINT A (1 )
40 PRINT A
50 END
Output:
4
0
READY
Double variable arrays are useful for tracking coordinates, like:
10 LET C ( Player1X, Player1Y ) = 1
Also, is it going to be modular or linear? (like QBasic style or like GW-Basic style )
And the color statement is good too.
Yeah, writing programs in C++ can be rather frustrating (so i've heard ), and that sort of worries me because I will be learning it this summer. After I learn it, I have to start Star Defenders Online, and... ouch.
I guess the main focus of my post is: Don't Give Up!
|
|
|
|
| Well, it will be like gwbasic, infact i need to go ahead and download (or find ) gwbasic,
as a reference.
color, i dont know if the console supports color, it will be a while ;- )
unfortunatly it wont support graphics, soon anyway.
I do plan to add the ability to get a http file into a string or somthing.
SARCASM one more thanks to microsoft for /SARCASM
http://support.microsoft.com/kb/307476/en-us
|
|
|
|
H/PC Sensei Posts: | 1,330 |
Location: | North of England | Status: | |
| BasiCE seems to support arrays, but the use your making of arrays there is nasty... You really shouldn't have a variable that's also an array. If a is an array, you access it with an index. If it isn't, you don't. Mixing like that is a receipe for disaster
You can't redim in BasiCE by the look of it, but there'd be ways around it.
|
|
|
|
Administrator H/PC Oracle Posts: | 17,990 |
Location: | United Kingdom | Status: | |
| chiark - 2006-01-18 9:31 PM You can't redim in BasiCE by the look of it, but there'd be ways around it. Having to redim always gives me a headache... maily because I have to think about it. Come to think of it, I'm thinking about it now... now look what you've gone and done!
10 goto 20
20 print "Redim gives C:Amie a headache"
30 goto 10
end |
|
|
|
| Well,
my line editor is buggy, and when i LIST the code it starting running it for
some reason, and some strings seem to be random data, but other than
that i can:
type in statements starting with line numbers
LIST them
RUN them
commands supported (partially):
PRINT
SYSTEM(return to OS)
GOTO
END
TRON
TROFF
Next up, fix the bugs, add variable assignment and operations,then
maybe some goodies like strings, flow control (if/for), maybe even
SAVE and LOAD :-)
|
|
|
|
H/PC Elder Posts: | 1,712 |
Location: | New Mexico, US | Status: | |
| chiark - 2006-01-18 5:08 AM
**WARNING: SERIOUSLY OFF TOPIC! **
I used to code for the Amiga, and the first sector contained the boot code which could be rewritten. I managed to fit a small graphic, scroller and sound sample into that space (512 bytes IIRC ). I think it's just one sector, but it might be more...
Doing anything near what those guys are doing with 64k is scarily complex.
And now, back to the basic interpreter
hehe ... sounds a bit like what the "DENZUKO" virus does ... ... I thought that virus was really cool, show up a DENZUKO sign with blinds effect and I think some sfx love. |
|
|