Jump to content

Photo

xdt99: New TI 99 cross-development tools available


222 replies to this topic

#201 RickyDean ONLINE  

RickyDean

    Dragonstomper

  • 613 posts

Posted Fri May 12, 2017 8:02 AM

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.



#202 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,398 posts
  • Location:Denmark

Posted Fri May 12, 2017 8:10 AM

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.



#203 Airshack OFFLINE  

Airshack

    Moonsweeper

  • 454 posts
  • Location:Phoenix, AZ

Posted Mon May 22, 2017 4:35 PM

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



#204 PeteE ONLINE  

PeteE

    Star Raider

  • 65 posts
  • Location:Beaverton, OR

Posted Mon May 22, 2017 5:54 PM

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/e...#installation-1


Edited by PeteE, Mon May 22, 2017 5:56 PM.


#205 Airshack OFFLINE  

Airshack

    Moonsweeper

  • 454 posts
  • Location:Phoenix, AZ

Posted Mon May 22, 2017 6:28 PM

Thanks brother!


Sent from my iPhone using Tapatalk

#206 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,398 posts
  • Location:Denmark

Posted Wed Jun 14, 2017 1:12 PM

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+

Thanks,

Rasmus



#207 InsaneMultitasker OFFLINE  

InsaneMultitasker

    Stargunner

  • 1,670 posts

Posted Sun Jun 18, 2017 3:48 AM

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, Sun Jun 18, 2017 4:57 AM.


#208 ralphb OFFLINE  

ralphb

    Moonsweeper

  • Topic Starter
  • 479 posts
  • Location:Germany

Posted Sun Jun 18, 2017 5:21 AM

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.



#209 ralphb OFFLINE  

ralphb

    Moonsweeper

  • Topic Starter
  • 479 posts
  • Location:Germany

Posted Sun Jun 18, 2017 5:34 AM

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:



#210 InsaneMultitasker OFFLINE  

InsaneMultitasker

    Stargunner

  • 1,670 posts

Posted Sun Jun 18, 2017 2:04 PM

 

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



#211 ralphb OFFLINE  

ralphb

    Moonsweeper

  • Topic Starter
  • 479 posts
  • Location:Germany

Posted Tue Jun 20, 2017 12:13 PM

Sounds good.  I'll let everyone know when I have my linker exposed.



#212 InsaneMultitasker OFFLINE  

InsaneMultitasker

    Stargunner

  • 1,670 posts

Posted Sat Jun 24, 2017 12:57 AM

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, Sat Jun 24, 2017 2:11 AM.


#213 ralphb OFFLINE  

ralphb

    Moonsweeper

  • Topic Starter
  • 479 posts
  • Location:Germany

Posted Sat Jun 24, 2017 3:04 AM

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.



#214 InsaneMultitasker OFFLINE  

InsaneMultitasker

    Stargunner

  • 1,670 posts

Posted Sat Jun 24, 2017 4:57 AM

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.



#215 ralphb OFFLINE  

ralphb

    Moonsweeper

  • Topic Starter
  • 479 posts
  • Location:Germany

Posted Sat Jun 24, 2017 5:17 AM

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?



#216 mizapf OFFLINE  

mizapf

    River Patroller

  • 2,474 posts
  • Location:Germany

Posted Sat Jun 24, 2017 5:48 AM

This can be assembled on the TI:

 

A     CLR  R0
B     BSS  252
C     JMP  A
D     JMP  F
E     BSS  254
F     CLR  R1

      END


#217 ralphb OFFLINE  

ralphb

    Moonsweeper

  • Topic Starter
  • 479 posts
  • Location:Germany

Posted Sat Jun 24, 2017 6:13 AM

 

This can be assembled on the TI:

 

This can also be assembled with xas99, no error messages.  This is the object code:

 

Attached File  t.obj   240bytes   3 downloads



#218 InsaneMultitasker OFFLINE  

InsaneMultitasker

    Stargunner

  • 1,670 posts

Posted Sat Jun 24, 2017 2:36 PM

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, Sat Jun 24, 2017 3:46 PM.


#219 ralphb OFFLINE  

ralphb

    Moonsweeper

  • Topic Starter
  • 479 posts
  • Location:Germany

Posted Mon Jun 26, 2017 9:21 AM

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.



#220 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,710 posts
  • Location:BUR

Posted Mon Jun 26, 2017 1:01 PM

Classic99 should tolerate TIFILES files with the extra fields, but the extra data will be lost if Classic99 re-saves the file. I don't intend to ever support those extensions, as I don't agree with them.



#221 ralphb OFFLINE  

ralphb

    Moonsweeper

  • Topic Starter
  • 479 posts
  • Location:Germany

Posted Mon Jun 26, 2017 1:23 PM

Yeah, I know, no sweat.  To extract a file, you can add the -9 option to get the reduced format (-9 for v9t9), but you cannot combine -9 with convert to TIFILES -T yet.



#222 InsaneMultitasker OFFLINE  

InsaneMultitasker

    Stargunner

  • 1,670 posts

Posted Mon Jun 26, 2017 1:41 PM

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.



#223 ralphb OFFLINE  

ralphb

    Moonsweeper

  • Topic Starter
  • 479 posts
  • Location:Germany

Posted Mon Jun 26, 2017 1:52 PM

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.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users