Jump to content
Sign in to follow this  
TheBF

Object file format details?

Recommended Posts

Does anybody know where I can get some information on how to make object files that can be loaded by E/A Option 3?

 

I want to add this output format to my cross compiler.

 

Thanks

 

BF

Share this post


Link to post
Share on other sites

So I created a little set of markup tags that let me create the output format.

Which makes the final program to generate an object file look like this.

HEX
: .EA3  ( -- )
        <NEW.EA3>
        LOADADDRESS <AORG>
        <HEADER>
        THERE ORGADR @
        DO
           <9> I <####>  I  B/REC <WORDS>  <CRC> <EOR> <LINE#> <BR>
        B/REC +LOOP
        <EOF> <FOOTER>  <LINE#> ;

Which I thought was pretty clever. :)

 

But I have something wrong with the checksum.

 

I thought it would be simple to create a little ASM program and compare the object file from the TI assembler,

but I cannot get Classic99 to generate one.

 

My program assembles with no errors.

What incantations do I need to create an object file in Classic99 E/A?

 

B

 

*EDIT* OK I got a file but it is binary. (compressed) But I did not use the C option. ??

 

EDIT2: OK it's not compressed its in a CLASSIC99 format. So I will have to create that around my ea3 file.

 

The fog is slowly lifting...

Edited by TheBF

Share this post


Link to post
Share on other sites

Classic99 does not have its own formats. So there is no "Classic99 format". This is very intentional.

 

If you used a disk image, then it's a V9T9 disk image (also called 'sector format'). The file would be inside that.

 

If you are using FIAD instead, then it's either a V9T9 file or a TIFILES file, depending on what you have configured. Both of these have a 128 byte header (which differs slightly) followed by the actual data, laid out as it would be on a diskette (that is to say, blocked into 256 byte 'sectors'.)

 

You can usually ask Classic99 to write a text file as a Windows text file by inserting a "?W" string after the device name (ie: DSK1.?W.OUTPUT.TXT). However, in testing here this trick does not work with the output filename from the assembler because it tries to work as DF80 (instead of DV80) and also tries to open the output file in UPDATE mode instead of OUTPUT mode. These two steps trigger an error message that stops the assembler.

 

There are two ways to work around it. The first, and the simplest way, is to assemble normally. Then use the PRINT option to write it out to a Windows file (thus Classic99 does the conversion for you). Just print to "DSK1.?W.OUTPUT.TXT". I've tried this and it works fine. (You can also print to "CLIP" to put it on the clipboard instead for pasting).

 

post-12959-0-65152000-1494348602_thumb.png

 

The second way if you will do this a lot is to change the option on the disk configuration and enable "Write DF80 as Windows Text". Just be aware that this can in some instances make it difficult to reload the file into the TI emulator again, since all the format information is thrown away. I'd recommend the print approach for now.

Edited by Tursi
  • Like 1

Share this post


Link to post
Share on other sites

Classic99 does not have its own formats. So there is no "Classic99 format". This is very intentional.

 

If you used a disk image, then it's a V9T9 disk image (also called 'sector format'). The file would be inside that.

 

If you are using FIAD instead, then it's either a V9T9 file or a TIFILES file, depending on what you have configured. Both of these have a 128 byte header (which differs slightly) followed by the actual data, laid out as it would be on a diskette (that is to say, blocked into 256 byte 'sectors'.)

 

You can usually ask Classic99 to write a text file as a Windows text file by inserting a "?W" string after the device name (ie: DSK1.?W.OUTPUT.TXT). However, in testing here this trick does not work with the output filename from the assembler because it tries to work as DF80 (instead of DV80) and also tries to open the output file in UPDATE mode instead of OUTPUT mode. These two steps trigger an error message that stops the assembler.

 

There are two ways to work around it. The first, and the simplest way, is to assemble normally. Then use the PRINT option to write it out to a Windows file (thus Classic99 does the conversion for you). Just print to I've tried this and it works fine. (You can also print to "CLIP" to put it on the clipboard instead for pasting).

 

attachicon.gifpic.png

 

The second way if you will do this a lot is to change the option on the disk configuration and enable "Write DF80 as Windows Text". Just be aware that this can in some instances make it difficult to reload the file into the TI emulator again, since all the format information is thrown away. I'd recommend the print approach for now.

I have found frustration with Assembler cutting off text files an 80 columns yet my RICH/NOTEPAD text files are much longer lines.

 

The GPL Assembler and Editor Assembler both do this. Does this still happen with "DSK1.?W.OUTPUT.TXT". as I assume they work without change?

Share this post


Link to post
Share on other sites

Classic99 does not have its own formats. So there is no "Classic99 format". This is very intentional.

 

If you used a disk image, then it's a V9T9 disk image (also called 'sector format'). The file would be inside that.

 

If you are using FIAD instead, then it's either a V9T9 file or a TIFILES file, depending on what you have configured. Both of these have a 128 byte header (which differs slightly) followed by the actual data, laid out as it would be on a diskette (that is to say, blocked into 256 byte 'sectors'.)

 

You can usually ask Classic99 to write a text file as a Windows text file by inserting a "?W" string after the device name (ie: DSK1.?W.OUTPUT.TXT). However, in testing here this trick does not work with the output filename from the assembler because it tries to work as DF80 (instead of DV80) and also tries to open the output file in UPDATE mode instead of OUTPUT mode. These two steps trigger an error message that stops the assembler.

 

There are two ways to work around it. The first, and the simplest way, is to assemble normally. Then use the PRINT option to write it out to a Windows file (thus Classic99 does the conversion for you). Just print to "DSK1.?W.OUTPUT.TXT". I've tried this and it works fine. (You can also print to "CLIP" to put it on the clipboard instead for pasting).

 

attachicon.gifpic.png

 

The second way if you will do this a lot is to change the option on the disk configuration and enable "Write DF80 as Windows Text". Just be aware that this can in some instances make it difficult to reload the file into the TI emulator again, since all the format information is thrown away. I'd recommend the print approach for now.

 

Thanks Tursi!

  • Like 1

Share this post


Link to post
Share on other sites

I have found frustration with Assembler cutting off text files an 80 columns yet my RICH/NOTEPAD text files are much longer lines.

 

The GPL Assembler and Editor Assembler both do this. Does this still happen with "DSK1.?W.OUTPUT.TXT". as I assume they work without change?

 

I expect it will still cut off. The Editor/Assembler package opens everything with 80 character record lengths, so no line can be longer than 80 chars.

  • Like 1

Share this post


Link to post
Share on other sites

This is a little convoluted but I think you could do it with Classic99 if you know the start address and the end address of the program's image in memory.

 

  1. Load the object file program into Classic99
  2. Press F1 to stop the program
  3. Press Select the "Make" Menu in Classic99 and click the "Save memory as a program option"
  4. Typically you would click the high RAM box and enter the start and end addresses.  (make end address 1 byte more if end is an even number)
  5. Enter the start address which is the address the program enters to run itself.
  6. Click Include E/A utilities and character set if your program depends on those things (I have never used this)
  7. Press the build button

Its one way to "skin the cat"

  • Like 1

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...