Jump to content
IGNORED

xdt99: New TI 99 cross-development tools available


Recommended Posts

Oh is that it? I already have python 2.7 installed.

 

I can do the path stuff no problem but I probably wouldn't bother. I'd just write batch files in my source code directory to invoke the assembler.

Python is now up to version 3.6 something, this may or may not matter. I'm taking some lessons on stackskills on it now, though my boss came in and told me to start studying on Cold Fusion, for a new client. Learning never ends.

Python is now up to version 3.6 something, this may or may not matter. I'm taking some lessons on stackskills on it now, though my boss came in and told me to start studying on Cold Fusion, for a new client. Learning never ends.

 

I believe you need version 2.7 for xdt99.

  • 2 weeks later...

Requesting help with finding and installing the IntelliJ plug-in.

The plugin is under the ide\idea directory, and is called xdt99-idea.jar

 

The install instructions are here: https://github.com/endlos99/xdt99/blob/master/ide/EDITORS.md#installation-1

Edited by PeteE
  • 4 weeks later...

I'm one step closer to successfully assembling some of my code with XDT99. I have a few questions that I can't find answers to after reading the online docs:

 

1. Is there a way to pipe the assembly errors into a file? My initial attempts to generate object code are throwing a LOT of errors and it's impossible to know where to start making corrections. (Edit: I expanded the command line buffer so that I can manually copy/paste the errors into another file. this lead to a new question: )

2. Is there a way for xdt99 to report which COPY file and line number the error occurs in? My project has around 20 files that are copied during assembly. The error reporting doesn't seem to tell me where to look?

3. What is the process for linking multiple object files using REF/DEF? I program routines in self-contained code to make it more portable. REF/DEF are mentioned in the documentation, but I can't figure out how to make use of them.

4. Is there a way to generate a list of DEF and REF labels and their addresses? This is one of a few features of Paul Charlton's GENASM/GENLINK programs that have spoiled me on the Geneve. (There might be a few ideas to glean from the package's manual if interested).

 

 

I have been able to assemble source and create both object and image files for simple programs, so I know the tool itself is working :)

 

Edit: I figured out how to turn off the extensions with the -s flag, although it then took me a while to figure out that doing so restricted long labels as well. Either I need to shorten all of my long labels or add more whitespace before offending comments. Maybe long labels could be allowed at all times? Just a thought.

 

This is fun :)

Edited by InsaneMultitasker

Would it be possible to allow aliases for the registers in the IntelliJ IDEA plugin, like if you have:

sp equ 10

then it should be valid to have:

label mov r1,*sp+

 

I see what you want to do. For EQUs, this should be possible. Right now I actually parse the "R", so a more general register, where only the value 0-15 counts, should be more accurate. I'll tackle it once the FG99 is out of the door.

 

In fact, now that I worked with xas99 and xga99 extensively, I can think of some improvements to the assemblers themselves.

  • Like 1

I'm one step closer to successfully assembling some of my code with XDT99. I have a few questions that I can't find answers to after reading the online docs:

 

1. Is there a way to pipe the assembly errors into a file? My initial attempts to generate object code are throwing a LOT of errors and it's impossible to know where to start making corrections. (Edit: I expanded the command line buffer so that I can manually copy/paste the errors into another file. this lead to a new question: )

2. Is there a way for xdt99 to report which COPY file and line number the error occurs in? My project has around 20 files that are copied during assembly. The error reporting doesn't seem to tell me where to look?

3. What is the process for linking multiple object files using REF/DEF? I program routines in self-contained code to make it more portable. REF/DEF are mentioned in the documentation, but I can't figure out how to make use of them.

4. Is there a way to generate a list of DEF and REF labels and their addresses? This is one of a few features of Paul Charlton's GENASM/GENLINK programs that have spoiled me on the Geneve. (There might be a few ideas to glean from the package's manual if interested).

 

 

I have been able to assemble source and create both object and image files for simple programs, so I know the tool itself is working :)

 

Edit: I figured out how to turn off the extensions with the -s flag, although it then took me a while to figure out that doing so restricted long labels as well. Either I need to shorten all of my long labels or add more whitespace before offending comments. Maybe long labels could be allowed at all times? Just a thought.

 

This is fun :)

 

Hi Tim,

 

It's not entirely clear if you refer to assembly or GPL, but based of the REF/DEF, I assume you mean assembly.

 

1. That depends on your OS. Error messages are output to stderr, so with bash you'd redirect with xas99.py ... 2> errors.txt.

2. No, unfortunately, right now the file name is missing from the error messages. It's in the listing -L, but that is empty in case of an error. Either way, it should be an easy fix.

3. Currently, you cannot link external object files, as linking is done automatically after assembly. This is also something I want to improve on. For now, your best bet is to copy the sources of the object files you want to use.

4. They are generated inside the object file, but no, I haven't implemented the symbol list -S yet. Also on my todo list. :ponder:

 

But it's great that you report any shortcomings for you. If they're sensible, like yours, I'll incorporate them into xdt99 as soon as I can. :thumbsup:

  • Like 2

 

Hi Tim,

 

It's not entirely clear if you refer to assembly or GPL, but based of the REF/DEF, I assume you mean assembly.

 

1. That depends on your OS. Error messages are output to stderr, so with bash you'd redirect with xas99.py ... 2> errors.txt.

2. No, unfortunately, right now the file name is missing from the error messages. It's in the listing -L, but that is empty in case of an error. Either way, it should be an easy fix.

3. Currently, you cannot link external object files, as linking is done automatically after assembly. This is also something I want to improve on. For now, your best bet is to copy the sources of the object files you want to use.

4. They are generated inside the object file, but no, I haven't implemented the symbol list -S yet. Also on my todo list. :ponder:

 

But it's great that you report any shortcomings for you. If they're sensible, like yours, I'll incorporate them into xdt99 as soon as I can. :thumbsup:

 

Thank you :) I was referring to assembly and I am using the Windows environment. I tried copying the source for some of the object files, but many of the labels are duplicated for various reasons. Someone PM'd me with the idea to look at Fred's Linker99, which supposedly can link and load external object files, so I'll look at using that together with the object generated by xas99. :)

Tonight I spent some time preparing my source files for xas99. To help me identify which file contains each "error", I inserted a line with incorrect syntax such as "LIMI **************filename.a99" at the top of each file. This helped me track down some of the offending lines. (I am used to GenAsm which displays the current copy filename and line number containing the error).

 

I ran into trouble. xas99 was displaying errors but they weren't following the file copy order. For example, a label error in the sixth file was listed well before errors in the second file. This greatly confused me as I could not figure out where the errors were located without searching each file.

 

I also noticed that many errors are the result of text placed one space after an instruction or field:

 

" MOVB @LABEL1,@LABLE2 comment1"

" TEXT 'this is a test line' *comment"

 

Both generate errors during assembly. If I add another space, these same statements work fine. (Edit: I have found all the single space offending lines)

 

Edit:

I also am having some trouble with JMP/JGT/JLE/etc. xas99 is telling me that jumps are out of range. The same code assembles properly on real hardware. Are the jump limits too restrictive?

 

I tried to compare object files between xas99 and real hardware, but finally figured out that xas99 does not generate the object/image if there are errors :(

 

Thanks

Edited by InsaneMultitasker

Tim, I added the filename to the error message. Please get the latest version directly here.

 

Regarding the JMPs, this is what my code does:

disp = (addr - effectiveLC()) / 2 - 1
if disp < -128 or disp > 127:
  raise AsmError("Out of range: " + op + " +/- " + hex(disp))

I thought this corresponds to what the E/A manual states (which may be wrong, of course). What is the displacement shown in your error message? Do you have some example code? I'll have a look at is when I have some time, maybe the effectiveLC is off.

The signed displacement in the jump instruction is multiplied by 2 (bit shifted left) prior to being added to the PC. That is, each bit represents one word. Are you doubling the displacement before subtracting it from addr?

 

I'll look at some code later today if time permits to see if there is an example I can share.

That would be great, Tim!

 

Above code is the assembler doing the displacement calculation. To jump 6 bytes forward, this is 3 words, minus 1 word, which is the standard PC increment, yielding a displacement of 2. The 9900 interprets that as PC <= PC + 2 + (2 * displacement). Is there's an error in my reasoning?

That would be great, Tim!

 

Above code is the assembler doing the displacement calculation. To jump 6 bytes forward, this is 3 words, minus 1 word, which is the standard PC increment, yielding a displacement of 2. The 9900 interprets that as PC <= PC + 2 + (2 * displacement). Is there's an error in my reasoning?

 

I manually counted the words in my code and that yielded 120. So then I started to play... I downloaded your updated xas99 file with the filename display (very good, thank you!) and reassembled my code. The JMP errors did not change. So I then started to remove the intentional syntax errors (LIMI ***filename). I noticed that by doing so, the JMP offset was decreasing. This made no sense, because the syntax errors were in different files and were -not- within the jump code. As I removed the lines, the offending jump errors started disappearing.

 

I don't know if xas99 was miscounting the address/displacement because of the syntax error, its location in the file, or the specific use of LIMI. The good news is that the code now assembles with 0 errors. I don't know if there is anything I can do to help you track down this odd problem, just let me know... My next step is to work on generating the program file :)

 

(edit: here is how I am currently assembling then creating my FIAD program images. If there is a better way to do this, I'm open to suggestions. ;) I am using Fred's UberHDX program to copy/run the program image files directly from this PC folder via the ubergrom uart. Next step is to test the program operation)

 

..\xas99 -R -i -o timxt1 copyti_s.txt

..\xdm99 -T copyti_s.img -n plop1 -o plop1

..\xdm99 -T copyti_t.img -n plop2 -o plop2

..\xdm99 -T copyti_u.img -n plop3 -o plop3

Edited by InsaneMultitasker

Regarding the error messages counting as a word: If the error only happens in pass <2>, like for LIMI, which ignores its expression in pass <1> and reserves space for "LIMI 0" instead, erroneous statements will not generate code, but affect all other symbol values. Of course, the nonsense will fail in pass <2>.

 

Pass <1> is meant only to find symbol values (unlike xga99, which assembles over and over until the object code doesn't change any more).

 

Your four steps look great! I think the generated FIAD files have more information like the filename in them than the Classic99 default, but I think Classic99 tolerates them.

Your four steps look great! I think the generated FIAD files have more information like the filename in them than the Classic99 default, but I think Classic99 tolerates them.

Fred's HDX server seems to tolerate whatever additional information you are providing. I have not yet tested the v9t9 option as I prefer TIFILES format. The latter maintains compatibility with the transfer of files via terminal emulation.

Just for clarification, keep what you're doing: What I meant by -9 is that if you extract a file from a disk image

.

xdm99.py some.dsk -e somefile -9

.

then somefile.v9t9 will be the reduced TIFILES format that v9t9 and Classic 99 use.

  • 1 month later...

I've finally released a new version of the xdt99 suite.

The biggest change is the inclusion of two disassemblers xda99 and xdg99 for machine code and GPL bytecode, resp. They support top-down disassembly as well as "run" disassembly that tries to follow the program flow and thus won't disassemble data segments.

Additionally, xas99 has some new features:

  • include filename in error message
  • create a textual version of the binary using BYTEs
  • include symbols in listing (option S of E/A)
  • generate EQU file of used symbols

Likewise, xga99 is moving ahead for feature parity with xas99:

  • generates listing
  • generate symbols (like xas99)

Since the disassemblers are brand new and not so thoroughly tested as the assemblers yet, I'm happy to receive bug reports and feature requests.

 

Download link here (don't download the source) Manual link here

 

For the next release, I'm going to tackle my huge backlog and bug list, before I'll do a big refactoring after that.

  • Like 8
  • 3 weeks later...

Oh is that it? I already have python 2.7 installed.

 

I can do the path stuff no problem but I probably wouldn't bother. I'd just write batch files in my source code directory to invoke the assembler.

 

Interested in how this works Willsy. Example?

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...