Jump to content

Photo

Need info about the ABC basic compiler (from Monarch Data Systems)


30 replies to this topic

#1 Kroah OFFLINE  

Kroah

    Star Raider

  • 56 posts
  • Location:France

Posted Mon Jul 30, 2012 8:01 AM

Hello all,

I'm actually decompiling a basic program compiled with ABC "A Basic Compiler" from Monarch Data Systems. It becomes a little boring because the program uses a runtime interpreter executing p-code, so i'm decompiling the interpreter first. I could then decompile the p-code.
Having read the manual of the MMG Compiler (it contains interesting info about the compiler), i think the manual of ABC could speed up the process.

- Does anyone have the manual of this compiler?

Someone in 1999 said he got a turbo basic decompiler UNKOMP.TRB for the p-code generated by this compiler (p-code -> basic):
http://groups.google.../month/1999-07?

- Does anyone have this decompiler?

I really can't find any info about ABC beside the disk images and the fact it uses its own p-code.

Any help appreciated! :)

#2 www.atarimania.com OFFLINE  

www.atarimania.com

    Stargunner

  • 1,726 posts

Posted Mon Jul 30, 2012 10:12 AM

Not sure I understand your post correctly. You read the instructions but need them?

Anyway, the program is a re-release of Datasoft's BASIC Compiler for which we have the manual so maybe that could help you.

--
Atari Frog
http://www.atarimania.com

#3 russg OFFLINE  

russg

    Stargunner

  • 1,648 posts
  • Location:Cleveland, Ohio

Posted Mon Jul 30, 2012 10:14 AM

Hello all,

I'm actually decompiling a basic program compiled with ABC "A Basic Compiler" from Monarch Data Systems. It becomes a little boring because the program uses a runtime interpreter executing p-code, so i'm decompiling the interpreter first. I could then decompile the p-code.
Having read the manual of the MMG Compiler (it contains interesting info about the compiler), i think the manual of ABC could speed up the process.

- Does anyone have the manual of this compiler?

Someone in 1999 said he got a turbo basic decompiler UNKOMP.TRB for the p-code generated by this compiler (p-code -> basic):
http://groups.google.../month/1999-07?

- Does anyone have this decompiler?

I really can't find any info about ABC beside the disk images and the fact it uses its own p-code.

Any help appreciated! :)

Well, Here goes. ABC Compiler manual in pdf.zip (8 megs) and Dis6502.zip (500K), a decompiler for the PC for Atari .COM files, if I remember.
..... Nope, the manual is too big for AA. Uhm... I'll see if you have an e-mail address in your profile.
I see your e-mail on your website, trying to send 8 meg file to there. Also, I don't think this manual has much technical info to help you much.

Attached Files


Edited by russg, Mon Jul 30, 2012 10:27 AM.


#4 russg OFFLINE  

russg

    Stargunner

  • 1,648 posts
  • Location:Cleveland, Ohio

Posted Mon Jul 30, 2012 10:17 AM

Not sure I understand your post correctly. You read the instructions but need them?

Anyway, the program is a re-release of Datasoft's BASIC Compiler for which we have the manual so maybe that could help you.

--
Atari Frog
http://www.atarimania.com


I just scanned the ABC Compiler manual, version 1.0. Tell me how to send it to Atarimania? Maybe I'll just send it to you and you can post it on AM.
Nope, only atarimania in your profile. I don't know how upload to AM.

Edited by russg, Mon Jul 30, 2012 10:30 AM.


#5 Kroah OFFLINE  

Kroah

    Star Raider

  • Topic Starter
  • 56 posts
  • Location:France

Posted Mon Jul 30, 2012 11:01 AM

Not sure I understand your post correctly. You read the instructions but need them?

Anyway, the program is a re-release of Datasoft's BASIC Compiler for which we have the manual so maybe that could help you.

--
Atari Frog
http://www.atarimania.com

Hello Atari Frog,
I have the manual of the MMG compiler (which is a re-release of datasoft compiler). This manual contains some interesting info about the format of the compiled executable.
So i think that if i can get the ABC compiler manual, it may contain some good info too.

Well, Here goes. ABC Compiler manual in pdf.zip (8 megs) and Dis6502.zip (500K), a decompiler for the PC for Atari .COM files, if I remember.
..... Nope, the manual is too big for AA. Uhm... I'll see if you have an e-mail address in your profile.
I see your e-mail on your website, trying to send 8 meg file to there. Also, I don't think this manual has much technical info to help you much.

Thank you very much Russ for the ABC compiler manual, this is what i was looking for!

Concerning the decompiler, i'm talking about a turbo basic program which decodes the p-code of a ABC compiled program. The decompiled code is a basic program (without variable names and REM).

FYI, ABC compiles a basic program to intermediate "p-code" instructions. Those are interpreted by a runtime interpreter which is linked with the p-code instructions, so we get a self executable program.
Funny, ABC itself is written in basic and compiled with ABC compiler.

So if anyone owns the UNKOMP.TRB ABC decompiler... :)

I have emailed Thomas Richter (Atari++) who owned a copy of this program 13 years ago. I will let you know.

Edited by Kroah, Mon Jul 30, 2012 11:10 AM.


#6 Kroah OFFLINE  

Kroah

    Star Raider

  • Topic Starter
  • 56 posts
  • Location:France

Posted Tue Jul 31, 2012 2:25 AM

Thanks to Thomas Richter, he has sent me a copy of his Turbo Basic program.

It works great and i have been able to get the Basic code back from the p-code.

If you are interested, you can PM me.

#7 rdea6 OFFLINE  

rdea6

    River Patroller

  • 2,778 posts
  • Location:Arizona USA

Posted Tue Jul 31, 2012 2:41 AM

Attached File  datasoftbasic_compiler.pdf   115.49KB   233 downloads

You probably aready have this or something similair.

#8 rdea6 OFFLINE  

rdea6

    River Patroller

  • 2,778 posts
  • Location:Arizona USA

Posted Tue Jul 31, 2012 9:25 AM

Attached File  MMG_Basic_Compiler.pdf   1.04MB   592 downloads

I found this on my DATA flash usb drive.

#9 russg OFFLINE  

russg

    Stargunner

  • 1,648 posts
  • Location:Cleveland, Ohio

Posted Tue Jul 31, 2012 12:24 PM

Attached File  MMG_Basic_Compiler.pdf   1.04MB   592 downloads

I found this on my DATA flash usb drive.

I prefer the ABC. I've tried MMG, but didn't have such a good experience, perhaps because it was a crack. MMG did floating point, I believe, whereas ABC only does integer, and a few other limitations, no dynamic DIM for one.

#10 MrFish ONLINE  

MrFish

  • 5,365 posts

Posted Tue Jul 31, 2012 2:28 PM

I just scanned the ABC Compiler manual, version 1.0. Tell me how to send it to Atarimania? Maybe I'll just send it to you and you can post it on AM.
Nope, only atarimania in your profile. I don't know how upload to AM.


Why don't you just post it to one of the file download houses, like Rapidshare? Some members here also have sites that they're willing to host documents on. I'd like to have a copy of the manual.

#11 russg OFFLINE  

russg

    Stargunner

  • 1,648 posts
  • Location:Cleveland, Ohio

Posted Tue Jul 31, 2012 5:11 PM

I just scanned the ABC Compiler manual, version 1.0. Tell me how to send it to Atarimania? Maybe I'll just send it to you and you can post it on AM.
Nope, only atarimania in your profile. I don't know how upload to AM.


Why don't you just post it to one of the file download houses, like Rapidshare? Some members here also have sites that they're willing to host documents on. I'd like to have a copy of the manual.


You can try http://www.russgilb.net and maybe it will work.

#12 MrFish ONLINE  

MrFish

  • 5,365 posts

Posted Tue Jul 31, 2012 5:42 PM

I just scanned the ABC Compiler manual, version 1.0. Tell me how to send it to Atarimania? Maybe I'll just send it to you and you can post it on AM.
Nope, only atarimania in your profile. I don't know how upload to AM.


Why don't you just post it to one of the file download houses, like Rapidshare? Some members here also have sites that they're willing to host documents on. I'd like to have a copy of the manual.


You can try http://www.russgilb.net and maybe it will work.


Great. Thanks for taking the time to scan and post it.

#13 russg OFFLINE  

russg

    Stargunner

  • 1,648 posts
  • Location:Cleveland, Ohio

Posted Tue Jul 31, 2012 8:27 PM

I just scanned the ABC Compiler manual, version 1.0. Tell me how to send it to Atarimania? Maybe I'll just send it to you and you can post it on AM.
Nope, only atarimania in your profile. I don't know how upload to AM.


Why don't you just post it to one of the file download houses, like Rapidshare? Some members here also have sites that they're willing to host documents on. I'd like to have a copy of the manual.


You can try http://www.russgilb.net and maybe it will work.


Great. Thanks for taking the time to scan and post it.

You're welcome. Great to see people still interested in this. I can't find my original ABC disk. I guess it failed. It was one of the few I cracked myself. I don't know if what's available today
is my crack, I doubt it. I do have a 'working' copy still, (one of my cracks). I guess it failed and that makes it OK for me to crack and still be able to use it. My website is new, very basic,
I started it because I wrote a 'Financial Calculator' for Windows, must have .NET framework 4 to use it. It is a loan and installment payment program. Nobody much needs to figure out their loan.
I originally wrote it for the A8, and used it right up until I wrote this one. Uhm... I got off topic. You can download my FC2.ZIP calculator from the site.

Edited by russg, Tue Jul 31, 2012 8:31 PM.


#14 MrFish ONLINE  

MrFish

  • 5,365 posts

Posted Tue Jul 31, 2012 9:56 PM

You can try http://www.russgilb.net and maybe it will work.


Great. Thanks for taking the time to scan and post it.


You're welcome. Great to see people still interested in this.


Yea, I mean people are still writing programs in BASIC and it's always nice to have the option to compile.

As for the manual I think any manual of any significance is worth scanning for preservation purposes.

#15 Kroah OFFLINE  

Kroah

    Star Raider

  • Topic Starter
  • 56 posts
  • Location:France

Posted Thu Aug 2, 2012 1:45 AM

I have ported the decompiler to C#.

It has the same features has the Turbo Basic XL version and add the following :
- more lisible output (but can't be loaded back on Atari, useful to understand an unknown basic program).
- a dictionary can be defined to replace generic variable names by user defined ones.
- labels can be defined to name some lines.

I will post it here after some tests if anyone is interested.

Credit goes to Thomas Richter for his initial work on Atari.

#16 russg OFFLINE  

russg

    Stargunner

  • 1,648 posts
  • Location:Cleveland, Ohio

Posted Thu Aug 2, 2012 2:32 PM

I have ported the decompiler to C#.

It has the same features has the Turbo Basic XL version and add the following :
- more lisible output (but can't be loaded back on Atari, useful to understand an unknown basic program).
- a dictionary can be defined to replace generic variable names by user defined ones.
- labels can be defined to name some lines.

I will post it here after some tests if anyone is interested.

Credit goes to Thomas Richter for his initial work on Atari.

Anybody else finds it a little funny to have a decompiler for a compiler for Atari BASIC? Can we compile the decompiled code?

#17 Kroah OFFLINE  

Kroah

    Star Raider

  • Topic Starter
  • 56 posts
  • Location:France

Posted Thu Aug 2, 2012 3:01 PM

Anybody else finds it a little funny to have a decompiler for a compiler for Atari BASIC?

Yes, it's funny.
I find that it's even more funny to compile the compiler with the compiler.

When i saw that the game i disassemble was an interpreted p-code, i said "oh my bad, going to be difficult".
Then i thought "hey, but if i disassemble the compiler, i could understand the p-code format, cool.
but... then i couldn't believe it... i stumbled again upon interpreted p-code. VERY funny.

Can we compile the decompiled code?

The decompiled code is Atari Basic code. It can be listed, executed and whatever you want to do with. So it can be compiled again.
Some decompiled programs have too many variables, so it can't be loaded in Atari Basic. For those, you should execute them with Turbo Basic for example.

Edited by Kroah, Thu Aug 2, 2012 3:02 PM.


#18 AtariGeezer OFFLINE  

AtariGeezer

    River Patroller

  • 2,874 posts
  • Location:Santee, CA

Posted Thu Aug 2, 2012 5:12 PM

I have ported the decompiler to C#.

It has the same features has the Turbo Basic XL version and add the following :
- more lisible output (but can't be loaded back on Atari, useful to understand an unknown basic program).
- a dictionary can be defined to replace generic variable names by user defined ones.
- labels can be defined to name some lines.

I will post it here after some tests if anyone is interested.

Credit goes to Thomas Richter for his initial work on Atari.


I would be interested in peeking at your C code :)

Wasn't there a couple of *commercial* games/programs released using the Basic Compiler?
It would be cool to examine the decompiled code of those ;)

Jay

#19 Kroah OFFLINE  

Kroah

    Star Raider

  • Topic Starter
  • 56 posts
  • Location:France

Posted Thu Aug 2, 2012 5:46 PM

I would be interested in peeking at your C code :)

I will post it here after some bugfixes.

Wasn't there a couple of *commercial* games/programs released using the Basic Compiler?
It would be cool to examine the decompiled code of those ;)

You are right.

The one i'm actually decompiling and commenting is Imperium Galactum. The main part is coded in compiled Basic with ABC, and some asm gfx & I/O routines are called with the USR instruction.

Here's a sample of the decompiled pseudo code after some automatic cleanup (well... the code tag breaks the indentation...):
340 PrintNonPlayerLive:
		 POS. 2, 15
		 PRINT "7) NON-PLAYER LIFE"
		 POS. 29, 15
		 ON (V40_nonPlayerLiveValue_1Yes_2No + 1) GOTO 365, 366, 367
360 PrintRandomSetup:
		 POS. 2, 16
		 PRINT " <img src='http://www.atariage.com/forums/public/style_emoticons/<#EMO_DIR#>/icon_cool.gif' class='bbc_emoticon' alt='8)' /> RANDOM SETUP"
		 POS. 29, 16
		 ON (V42_randomSetupValue_1Yes_2No + 1) GOTO 365, 366, 367
365 PRINT "YES	 NO"
		 RETURN
		 --------------------------------------------------------------------------------
366 PRINT "_Y_E_S	 NO"
		 RETURN
		 --------------------------------------------------------------------------------
367 PRINT "YES	 _N_O"
		 RETURN
		 --------------------------------------------------------------------------------
380 InitPlayerNameEtc:
		 GOSUB 2_ClearScreenAndSetCursorToBottomWindow
		 PRINT "WHAT IS THE NAME OF "
		 PRINT "PLAYER ";V28_j + 1;
		 INPUT V1_string1$
		 IF ((V1_string1$ == "") OR (LEN (V1_string1$) > 17)) THEN
		 GOTO 380_InitPlayerNameEtc
390 V1_string1$(LEN (V1_string1$) + 1) = "				 "
395 V1_string1$ = V1_string1$(1, 17)
		 FOR V53_ = 1 TO 17
		 POKE (14104_Game_playersNameMin1_S17 + (V28_j * 17)) + V53_, ASC (V1_string1$(V53_, V53_))
		 NEXT V53_

The same without cleanup but pure Atari basic:
340POS.2,15:?"7) NON-PLAYER LIFE":POS.29,15:ONV40+1 GOTO 365,366,367
360POS.2,16:?"<img src='http://www.atariage.com/forums/public/style_emoticons/<#EMO_DIR#>/icon_cool.gif' class='bbc_emoticon' alt='8)' /> RANDOM SETUP":POS.29,16:ONV42+1 GOTO 365,366,367
365?"YES	 NO":RET.
366?"ÙÅÓ	 NO":RET.
367?"YES	 ÎÏ":RET.
380GOS.2:?"WHAT IS THE NAME OF "<img src='http://www.atariage.com/forums/public/style_emoticons/<#EMO_DIR#>/icon_confused.gif' class='bbc_emoticon' alt=':?' />"PLAYER ";V28+1;:I.V1$:IF(V1$="") OR (LEN(V1$)>17) THEN 380
390V1$(LEN(V1$)+1)="				 "
395V1$=V1$(1,17):F.V53=1 TO 17:POKE(14104+(V28*17))+V53,ASC(V1$(V53,V53)):N.V53

Edited by Kroah, Thu Aug 2, 2012 5:59 PM.


#20 bf2k+ OFFLINE  

bf2k+

    Stargunner

  • 1,772 posts
  • Location:Boot Factory BBS 2k+

Posted Fri Aug 3, 2012 3:45 AM

I would be interested in peeking at your C code :)


Me too...

I do what little programming I do in A8 using Atari Basic and compile the results (usually with MMG - I used to use ABC a lot also). I'd like to see your finished product.

Can it work with MMG compiled programs or just ABC?

#21 Kroah OFFLINE  

Kroah

    Star Raider

  • Topic Starter
  • 56 posts
  • Location:France

Posted Fri Aug 3, 2012 6:50 AM

Can it work with MMG compiled programs or just ABC?

Only with ABC.
MMG compiles to ASM language, not p-code. So it can't be decompiled, only disassembled.

Some games (or parts of them) compiled with ABC:
- Cavelord
- F15-Strike-Eagle
- Soloflight 1 & 2
- Imperium Galactum
- NATO Commander

And many games use copy protection p-code compiled with ABC to obfuscate the protection.
It's way harder to trace/disassemble an interpreted language than asm code.

Edited by Kroah, Fri Aug 3, 2012 6:50 AM.


#22 devwebcl OFFLINE  

devwebcl

    Stargunner

  • 1,238 posts
  • Location:Chile

Posted Sun Nov 4, 2012 7:50 AM

Thanks to Thomas Richter, he has sent me a copy of his Turbo Basic program.

It works great and i have been able to get the Basic code back from the p-code.

If you are interested, you can PM me.


Hi Kroah,

I PM you, but still I don't receive any response.

Maybe you can post the TBXL decompiler here :)

Thanks

Devwebcl

#23 russg OFFLINE  

russg

    Stargunner

  • 1,648 posts
  • Location:Cleveland, Ohio

Posted Sun Nov 11, 2012 7:14 AM

Hello all,

I'm actually decompiling a basic program compiled with ABC "A Basic Compiler" from Monarch Data Systems. It becomes a little boring because the program uses a runtime interpreter executing p-code, so i'm decompiling the interpreter first. I could then decompile the p-code.
Having read the manual of the MMG Compiler (it contains interesting info about the compiler), i think the manual of ABC could speed up the process.

- Does anyone have the manual of this compiler?

Someone in 1999 said he got a turbo basic decompiler UNKOMP.TRB for the p-code generated by this compiler (p-code -> basic):
http://groups.google.../month/1999-07?

- Does anyone have this decompiler?

I really can't find any info about ABC beside the disk images and the fact it uses its own p-code.

Any help appreciated! :)

I find three versions of ABC by Monarch. There's ABC 1.02, 1.03 and 1.05. I'm not sure if one of them is my patch of 1.03.
There's a .PRO image of 1.03, but it is enhanced/dual density/1040 sngl dens sector, not what the original 1.03 disk has.
The original disk only has 378 sectors, the rest of the sectors aren't there. Anybody familiar with 1.05 and 1.03, what
differences? I could try make a .PRO image.

#24 russg OFFLINE  

russg

    Stargunner

  • 1,648 posts
  • Location:Cleveland, Ohio

Posted Sun Nov 11, 2012 8:36 AM

I find three versions of ABC by Monarch. There's ABC 1.02, 1.03 and 1.05. I'm not sure if one of them is my patch of 1.03.
There's a .PRO image of 1.03, but it is enhanced/dual density/1040 sngl dens sector, not what the original 1.03 disk has.
The original disk only has 378 sectors, the rest of the sectors aren't there. Anybody familiar with 1.05 and 1.03, what
differences? I could try make a .PRO image.

I did a fresh .PRO image of ABC103. It is 100,816 bytes, bigger than a sngl .ATR, but smaller than the 1.03 I've seen
online. I think you have to have APE, maybe registered, to run a .PRO image.

Attached Files


Edited by russg, Sun Nov 11, 2012 8:37 AM.


#25 russg OFFLINE  

russg

    Stargunner

  • 1,648 posts
  • Location:Cleveland, Ohio

Posted Sun Nov 11, 2012 7:01 PM

I did a fresh .PRO image of ABC103. It is 100,816 bytes, bigger than a sngl .ATR, but smaller than the 1.03 I've seen
online. I think you have to have APE, maybe registered, to run a .PRO image.

For new to ABC, the manual is at:
http://www.russgilb.net
No dynamic DIM, no real numbers (integer only), no variable GOTO or GOSUB. Probably other stuff you can't do.
Oh, yes. You have to put the source .BAS file in D1: when prompted for source. It has to be on a DOS 2/2.5 maybe
MyDOS sngl dens disk. You don't give the drive number or D:, just the 8.3 file name. I think the destination
file also has to go on D1: same as source file, again, no drive spec. just the filename. The source .BAS
file has to be a SAVED tokenized file.

Edited by russg, Sun Nov 11, 2012 7:49 PM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users