Subject: How to assemble a DSR

From: "epergrem" <[email-masked]>
Date: Fri, 13 Jan 2012 01:42:27 -0000

I'm trying to assemble and create a image file from the source that was created when I disassembled a DSR.  My plans are to compare the re-assembled code with the binary dump to check for errors.

Any ideas on how to do this?  Especially since it has to be AORGed to >4000.

Thanks,
Ernie

---

From: Marc Hull <[email-masked]>
Date: Thu, 12 Jan 2012 19:52:11 -0800 (PST)

guess you need to write a loader that will enable the DSR space and then shoot or say shit.....  That has got to be a real PITA to write a DSR  just because of that.  Keep us posted Ernie....

--- On Thu, 1/12/12, epergrem <[email-masked]> wrote:

From: epergrem <[email-masked]>
Subject: [TI994A] How to assemble a DSR
To: [email-masked]
Date: Thursday, January 12, 2012, 7:42 PM

  

Thanks,

Ernie

---

From: "Stuart" <[email-masked]>
Date: Fri, 13 Jan 2012 14:51:59 -0000

Personally I'd get the files onto a PC. If you take the assembling list file (extract it from an emulator disk if need be), that has a column of the hex data produced by the assembly. Use Word or a decent text editor with column deletion capability to delete everything to the left and the right of the hex data, then remove all the <CR>s and you should be left with something similar to the binary dump. Fiddle a bit more if necessary to get the formats exactly the same then compare the files ...

Stuart.

---

From: "epergrem" <[email-masked]>
Date: Fri, 13 Jan 2012 21:12:49 -0000

Yep. I agree that might an easier way, but it ruins the fun of learning how to do it on TI.

Ernie

---

From: Tony Knerr <[email-masked]>
Date: Fri, 13 Jan 2012 17:47:25 -0500

Have you tried the RAG Assembler & Linker, Ernie?
I don't believe you actually need the memory present in the location 
that the file will reside
at for it to work. ...but I've been wrong in the past. ;)

Tony

On 1/12/2012 8:42 PM, epergrem wrote:
>
> I'm trying to assemble and create a image file from the source that 
> was created when I disassembled a DSR. My plans are to compare the 
> re-assembled code with the binary dump to check for errors.
>
> Any ideas on how to do this? Especially since it has to be AORGed to 
> >4000.
>
> Thanks,
> Ernie
>

---

From: "epergrem" <[email-masked]>
Date: Fri, 13 Jan 2012 23:41:08 -0000

Thanks Tony,

I've used RAG assembler, but it's been a couple decades since I've used the Linker.  I'll have to take a look at the docs.

One problem that I can see when assembling a DSR is resolving addresses to <4xxx instead of >Axxx which is where it will load by default.  You can't do a AORG >4000 becuase the location isn't accessible to the EA loader. 

Mike Wright turned me on to a method using PC99 and the debugger dump memory option, but I would really like to find a way to do it on a real TI.  I wonder how the TI guys did it?

Ernie

---

From: "Marc H" <[email-masked]>
Date: Sat, 14 Jan 2012 00:11:59 -0000

Hmmmmmmm.  Maybe helpful maybe not.  

When writing the SID Player and before you and Tim came along with the loader code I had a method in which I used Disk Utilities to print a hex listing of a file to disk.  I then had an XB program that read that file and stripped everything down to the HEX numbers and saved it as a DV80 file.  

Maybe if you assembled the program @>4000 and then converted it to a binary you could then do a similar process with the dump.

An XB program could be written to compare the 2 files...

---

From: Jeffrey White <[email-masked]>
Date: Fri, 13 Jan 2012 17:44:50 -0800 (PST)

Ernie,

You do have a Geneve with MDOS assembler/linker?  Paul Charlton had released a 
fairware package that allowed creating program images from the CLI, even ones 
meant for the 99/4A or GPL mode.

The normal EA should be able to assemble code AORG'd to >4000.  If you create an 
uncompressed object file, you can view the assembled program in a text editor. 
 There is additional info for the loader, so you need to learn about the format.

If the disassembly uses things like "B a>4100" instead of labels (where a is 
at-sign), you can AORG to any location but the code will still reference 
>4000-space.

If you have labels, such as "LOOP1 A R2,R1" you can use my DORG trick.  Instead 
of using AORG >4000, use DORG >4000.  Afterwards, but before the END, use AORG 
>A000 and the source code minus the labels at the beginning of the line.  I.e.

  DEF START
***Where the label addresses are set
DORG >4000
MYWS BSS 32
START LWPI,MYWS
  SETO R1
LOOP1 DEC R1
  JNE LOOP1
  BL @MYSUB
...
MYSUB ...
  RT
***Where the code gets stuffed
AORG >A000
  BSS 32
  LWPI,MYWS
  SETO R1
  DEC R1
  JNE LOOP1
  BL @MYSUB
...
  RT
END

Leastways that is how I remember it.

Jeff White 

________________________________
From: epergrem <[email-masked]>
To: [email-masked]
Sent: Thu, January 12, 2012 8:42:27 PM
Subject: [TI994A] How to assemble a DSR

I'm trying to assemble and create a image file from the source that was created 
when I disassembled a DSR. My plans are to compare the re-assembled code with 
the binary dump to check for errors.

Thanks,
Ernie

---

From: tursi <[email-masked]>
Date: Fri, 13 Jan 2012 18:54:20 -0800 (PST)

> Mike Wright turned me on to a method using PC99 and the debugger dump 
> memory option, but I would really like to find a way to do it on a real 
> TI.  I wonder how the TI guys did it?

I'm pretty sure they just stuck RAM at >4000. :)

If you have a Horizon RAMDisk (and don't mind temporarily erasing the 
ROS), you could use that. :)

---

From: Tony Knerr <[email-masked]>
Date: Sat, 14 Jan 2012 07:26:16 -0500

To use this method, you'd need a special assembler that would select the 
proper
CRU base when a write to ram in the >4000 area occurred. Remember, the DSRs
are all here and the disk controller would be using this area to access 
the files being used.

Tony

---

From: "jhwhite_delphi" <[email-masked]>
Date: Sat, 14 Jan 2012 16:06:12 -0000

> Ernie,
<snip>
>  SETOÂ R1

Ending a message with an excuse was my way of saying something did not seem right about the code.  The jump instructions need to be adjusted for this technique to work.  Thus, in the AORG section, you would want to use:

 JNE LOOP1+>A000->4000

As I am probably one of the few that even rarely used DORG with the 99/4A, I may be mis-remembering its utility.

Jeff White

---

From: ti99_forever <[email-masked]>
Date: Sat, 14 Jan 2012 10:28:37 -0800 (PST)

I used DORG, and RORG back in the day... I even tried to use PSEG/DSEG, which wasn't supported. One of these instructions did weird things, and I'd have to do a RORG at the end. Maybe it was DORG...

> From: jhwhite_delphi <[email-masked]>
>Sent: Saturday, January 14, 2012 11:06 AM
>Subject: [TI994A] Re: How to assemble a DSR
> 
>
>
>
>
>------------------------------------
>
>Yahoo! Groups Links
>
>
>
>
>
>

---

From: "epergrem" <[email-masked]>
Date: Sun, 15 Jan 2012 00:23:41 -0000

Barry used DORG in Archiver 3.03, but I have to admit that in looking at his source I never quite understood what DORG did.   

or.. perhaps I just didn't care enough to learn what it did. :-)

Ernie

> >--- In [email-masked], Jeffrey White <ti994a@> wrote:
> >

---

From: "epergrem" <[email-masked]>
Date: Sun, 15 Jan 2012 14:41:53 -0000

Hi Everyone,
An update on assembling a DSR. At Tony's suggestion I tried Art Green's LINKER. It was exactly what I needed.  

Among other things, it can create a program image which will load at a specified address, which in this case was >4000.  It does attach a six-byte header, but that is easily removed.

Once I had the image file, I moved the it to my PC and used Michael Zapf's most excellent TI Image tool to save the file as a plain dump and did the comparison.

The final test would be to burn the code into a EPROM, but the goal of this project was to comment the tmr control dsr source code.

Thanks for everyone's suggestions.  I really learned a lot from the interaction.

---

From: Marc Hull <[email-masked]>
Date: Sun, 15 Jan 2012 06:51:13 -0800 (PST)

So what did the DSR do ?

--- On Sun, 1/15/12, epergrem <[email-masked]> wrote:

From: epergrem <[email-masked]>
Subject: [TI994A] Re: How to assemble a DSR
To: [email-masked]
Date: Sunday, January 15, 2012, 8:41 AM

  

      Hi Everyone,

---

From: "epergrem" <[email-masked]>
Date: Sun, 15 Jan 2012 19:44:20 -0000

Hi Marc,
I'm still deciphering the source.  

It appears to need some additional programs; IPL, CONTROL and MMx, that I don't have.  In the mainframe world IPL, or Initial Program Load is the equivalent of BOOT. 

In the end, what it was used for is likely to remain a mystery and what I've been doing will just be learning for the sake of learning.

Ernie

---

From: "Paolo Bagnaresi" <[email-masked]>
Date: Sun, 15 Jan 2012 21:58:35 +0100

High Ernie!

If you still want to use the TI environment to load and save to disk some 
assembly code AORGed anywhere in memory (at >4000, like a DSR, for 
instance) I wrote two small Q&D programs for that purpose in the 80's, 
RELOADER and SAVMDOS, never published or officially released.

RELOADER allows you to load a program AORGed say, at >4000, or anywhere in 
memory for that matter, by adding a loading offset of your choice to the 
AORGed address of the OBJ at loading time. You just type in the Loading 
Offset at loading time. If you leave the Loading Offset at >0000, it will 
work just like the standard EA Loader. I simply modified the TI Tagged OBJ 
loader (Option 3) of EA to create this program.

SAVMDOS is an utility that acts like the TI SAVE Utility of EA package. 
Unlike it, at loading time, you can type-in the three addresses that the 
TI Save utility asks you to DEFine : SFIRST, SLOAD and SLAST. SAVMDOS is 
designed to work with the SuperSpace module (a TI EA module with an added 
RAM betwwen >6000 and >7FFF). If you want, you can modify the source code 
and make it work in another memory area but you need to modify it which 
amounts to simply do away with the active code in the RELOADER-S segment.

I needed these two programs to create program files for the Geneve (1) 
(mainly for my ill-fated BagBug program). They work on a TI, and they can 
create a valid program file according to the TI EA rules too (not only for 
Geneve).

I can provide you with the two above programs and their source. Tell me if 
you are interested.

Paolo Bagnaresi

Notes:
(1) - At those times I did not have access to the package that Paul 
Charlton wrote for a similar purpose.

----- Original Message ----- 
From: "epergrem" <[email-masked]>
To: <[email-masked]>
Sent: Sunday, January 15, 2012 8:44 PM
Subject: [TI994A] Re: How to assemble a DSR

Hi Marc,

It appears to need some additional programs; IPL, CONTROL and MMx, that I 
don't have.  In the mainframe world IPL, or Initial Program Load is the 
equivalent of BOOT.

In the end, what it was used for is likely to remain a mystery and what 
I've been doing will just be learning for the sake of learning.

Ernie

---

From: "epergrem" <[email-masked]>
Date: Mon, 16 Jan 2012 13:45:26 -0000

Thanks Paolo,
I don't have a use for the programs at this time because I'm only attempting to comment some DSR code, however I'm toying with the idea of building one of the John Clulow 8KDSR cards.  

If I follow through on the project then will be receiving a request. :-)

Ernie

---

From: "Paolo Bagnaresi" <[email-masked]>
Date: Mon, 16 Jan 2012 17:34:46 +0100

OK Ernie :-)

Paolo Bagnaresi
----- Original Message ----- 
From: "epergrem" <[email-masked]>
To: <[email-masked]>
Sent: Monday, January 16, 2012 2:45 PM
Subject: [TI994A] Re: How to assemble a DSR

Thanks Paolo,
I don't have a use for the programs at this time because I'm only 
attempting to comment some DSR code, however I'm toying with the idea of 
building one of the John Clulow 8KDSR cards.

Ernie

--- In [email-masked], "Paolo Bagnaresi" <paul.bagnaresi@...>