Jump to content
IGNORED

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


Kroah

Recommended Posts

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! :)

Link to comment
Share on other sites

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.

dis6502.zip

Edited by russg
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

  • Like 2
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 "  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:?" 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 ""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
  • Like 1
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 3 months later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

ABC103.zip

Edited by russg
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...