Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Who wants on-the-fly assembly language?

Author
Message
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Jul 2003 19:26
I've just started work on putting together a generic scripting language for DBPro.

While investigating this, I came across a nice library that allows machine code to be generated and executed on-the-fly.

I've decided to use this as the back-end of the script engine to avoid using a slow VM, but in the meantime, if I get a reasonably good response here, I could offer direct access to the assembler.

So ... who would like to see this, and who would use it?
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 5th Jul 2003 20:36
oh oh oh !!! ME ME ME!!

Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 5th Jul 2003 20:51
< Please mentally picture the donkey from Shrek bouncing around shouting "me", "me" >

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_103.zip
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 6th Jul 2003 00:05
pick me! me! me! meeee!

Mentor.

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Jul 2003 00:37
I would - dont know much assembler though (never did get the hang on x86 code)

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins and other exciting things - oh my, yes!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Jul 2003 01:02
Don't worry mate, I don't either ... yet!

Looks like this might be useful then. I'll get onto it.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 6th Jul 2003 01:33
sweet... the one language Raven actually knows will finally be at his fingertips in dbp mwhahahaahaa

Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 6th Jul 2003 01:51
Tight... I loves me asm...

EVERYONE LOVES THE PUFF!... =\
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Jul 2003 01:53
I bet we get some Amiga-themed games now, like :

Amiga Invaders - fight off the evil Atari's using your A500
Tony Hawks Pro Amiga Playing - Get Tony Hawk to install and play a skating game.
Grand Theft Auto:Amiga City - Take over Vice City and get it renamed.
Amiga Tournament 2003 - See who can build a CD32 as quickly as possible using nothing but pipecleaners and 'sticky backed plastic'.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins and other exciting things - oh my, yes!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Jul 2003 19:18
The basics are in place, and the following code runs:



It correctly swaps the contents of reg0 and reg1, and sets the correct value into reg2.

Some things to note:
No parameter passing yet - instead I've created 1024 'registers' to allow passing of data.
Symbols must be defined before compiling - the assembler compiles immediately and cannot cope with undefined symbols.
Creating a piece of code creates a symbol that can be used in code compiled later ('test' and 'caller')

Things not shown yet:
Conditional compilation - this is already built into the library, I just haven't tried it yet.
Static data - use DB, DW and DD to define the data.
All labels in a compilation unit are local, except for the entry point.

Things still to do:
Parameter passing - probably using the c calling convention as this is least limiting.
Load assembly code directly from a file - not sure it's necessary.
Allow calling of DBPro functions - undecided on this one.
Somehow get external symbols defined - for example 'malloc'. Unless you can get the funciton address, you can't call it.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 6th Jul 2003 23:26
looks good

MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 7th Jul 2003 04:32
Wow, an assembly language would be great, and I'd definitly use it.



2D Fighting game in Progress
SonicBoom
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 7th Jul 2003 05:17
Wow a C++ interface, Blue widgets and now assembler?

What's going on? I've had my head down for too long - DBPro has gone all.. well.. Pro!

Great Work!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Jul 2003 10:32
I'll check through the code I've put together again tonight to ensure that it's bullet-proof - I might think about releasing a BETA executable sometime later this week so that you can all have a play with it.

I've got to be a bit careful with this, coz the licencing for the library is almost-but-not-quite LGPL.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 7th Jul 2003 11:04
cool... ya know if we do have to have another DarkMatter for DBP - rather than media i think it should actually be fully of plugins suchas this - things that truely extend Pro

KamaKase
22
Years of Service
User Offline
Joined: 29th Oct 2002
Location:
Posted: 7th Jul 2003 21:52
Could someone help me...
What does all this mean.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 8th Jul 2003 00:59
if you don't know then i wouldn't worry about it too much...

but basically think about how with the Shaders you can edit and manipulate the 3D within a scene right?
well ASM is just like the Shaders, only rather than working on a 3D Level it works on a System/Processor level. Essencially it's giving you complete access to the system your working on regardless of the OS you are.

So say you wanted to create something like a Gameboy Emulator, but you needed process calls that only the Processor can give you - now you will be able to achieve that

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Jul 2003 00:19
I was hoping to release this tonight - I've put together enough support commands/functions for the assembler to be moderately useful.

Unfortunately, I'm wrestling with the LGPL to ensure that I'm complying with the licence of the library I'm using without having to give everything away immediately, and so that I can release the source fully and completely 'no strings attached' later if anyone ever wants it.

It'll most likely be tomorrow before I upload the DLL and the 'compliance' package to my site.
MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 10th Jul 2003 01:41
Take your time IanM.I think it's best if you don't rush it and just release the full part at once, but the sooner the better I guess. Whaterver you decide.



Yellow:Wanna publish my game microsoft, cuz i no u rich so...Can I have my bag of money now?
Microsoft: *snicker* Tip of the month-Microsoft will never(probebly) publish your game.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 10th Jul 2003 04:28
i'll be happy with a fully figured system later rather than sooner, we're not in any particular rush right now mate.
little updates of what you've got going should be enough, most who'll ask for more probably won't understand howto use it anyways. hehee

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Jul 2003 15:19
The assembler is finished, unless anyone requests further features that I can affect by changing *my* code, or better ways of implementing what I've done.

It's just the licencing issue I was struggling with ... here's some advice - never use an LGPL static library Got it solved now though
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Jul 2003 23:02
Ok, I've just uploaded it to my website for you all to have a play with. Just use the 'WWW' button below (no direct link, coz legally, I need you to see the text associated with it).
Preston C
21
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 11th Jul 2003 03:32
Assembler language? The only one I know of is the ones for the TI calcs. And I have no clue how to program that. Should I learn Assembler?

At first glance, I'm a mediocre mech pilot. Look again and you will see my battlemech's computer code rushing through my eyes. My Mech And I Are One!
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 11th Jul 2003 04:50
what is assembly? i'm a novice programmer, db is my first language ( i know html and learning basics of php) and have no clue what assembly is.

---Mattman
DID YOU KNOW THAT ???
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 11th Jul 2003 06:29
Oooooh source code...
nice site update btw - i like the new treemenu

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jul 2003 09:51
NWC Omega/Mattman: I'd give it a miss if I were you. This is only really of interest to ... well, absolute nutters really

Raven, glad you like it. It took ages to track down a decent one, but even this one wasn't quite what I wanted.

One of these days too, I'll actually complete the site
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 11th Jul 2003 10:00
hey i have a tonne of things on my HDD for sites, mostly java & php just lemme know what you need i might have it in library.
i have an MDSN version i'm working on in Java for my own site, when they'll be finished though is kinda a "one day" thing too lol

its funny how i can do some pretty complex task, but all this internet stuff like a total forgein language

KamaKase
22
Years of Service
User Offline
Joined: 29th Oct 2002
Location:
Posted: 26th Jul 2003 19:37
...what's a shader?
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 26th Jul 2003 19:41
An advanced graphical effect system, used for things like fur, realistic water, bump / normal mapping, glowing objects, per-pixel lighting. etc.

UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 26th Jul 2003 20:13
assembler is basically binary language, but instead of having
10111101110 or 16a6d33f you have the command goto. ITs far far simpler than even quick basic

the artist formally known as darkfluff
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 27th Jul 2003 02:53
Excellent.

Thanks a lot Ian

"Computers are useless they can only give you answers."
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jul 2003 03:59
No problem

While I'm here ...

Has anyone used it 'in anger' yet? If you have:
What have you used it for?
Apart from getting floats to/from assembly routines (I've just noticed that this is missing!), is there anything else that can be added that would make the assembler more complete?
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Jul 2003 04:36
:: looks around shifty ::
no one used it out of anger here

i was wondering where some things went, but i ended up stringing my own floats together ... did the same for 64bit registers like Double Longs

you plan to add BCDs? i'm still not entirely sure what they could be used for and they are highly inefficient but still its nice to have a total package

i'll see about putting up some code later i made which accesses the MMX extension - just a fancy way of making RasterBars hehee

Preston C
21
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 28th Jul 2003 06:29
I remember the first program I made with assembler for the TI83+. It was the usual "Hello World" Program. I later messed with the part of the machine code that had Hello World in it to say "You Suck". My friends thought it was funny that I even attempted assembler, so i quit, and started making a StarCraft like game on the TI83+. Never finished the thing.

At first glance, I'm a mediocre mech pilot. Look again and you will see my battlemech's computer code rushing through my eyes. My Mech And I Are One!
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 28th Jul 2003 08:08
A RTS game using TI-BASIC would've run so slow it wouldn't have been funny, not to mention the size of it would've taken up most of the calc's memory.

You'd have been better off using the Z-80 Assembly if you ever learned it.

"Computers are useless they can only give you answers."
Preston C
21
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 28th Jul 2003 17:38
well, it was Turned Based Strategy, sorta. Check out http://www.ticalc.org/archives/files/fileinfo/294/29460.html to see where I stopped programming. I left it with many bugs, and no enemy to fight.

At first glance, I'm a mediocre mech pilot. Look again and you will see my battlemech's computer code rushing through my eyes. My Mech And I Are One!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jul 2003 21:55
So that makes it a turn-based move around a bit
Preston C
21
Years of Service
User Offline
Joined: 16th May 2003
Location: Penn State University Park
Posted: 28th Jul 2003 21:59
yep, lousy game, but v0.2 got the most downloads

Login to post a reply

Server time is: 2024-11-21 20:29:04
Your offset time is: 2024-11-21 20:29:04