[comp.sys.tandy] What Am I Doing Wrong

sean@eleazar.dartmouth.edu (Sean P. Nolan) (11/22/89)

Hi ho...

I've got a question about my Model 100. I've gotten an 8085 compiler (thanks
Chris!) which produces Hex code, so I set about trying to write a BASIC
program that would load the files into RAM and then SAVEM them as machine
language files.

OK. My basic strategy was this:

* Read in a hex character A$ from the file
* Convert the hex to decimal
* Red in next hex character B$
* Convert the hex to decimal
* POKE ((A*16)+B) into memory (decimal representation of hex chars)
* Increment memory
* repeat until the file is done
* SAVEM the file.

OK. The program happily runs along and saves the .co file. But the compiled
program doesn't run and, in fact, hangs my machine. This tipped me off that
something was amiss....

So what am I doing wrong? My best bet is a problem with my SAVEM parameters.
I loaded the program into RAM at the same address that the ORG statement in
the original Assembler file dictated, and set the entry point for that
address as well.

Any hints? If you've done this, or have any insights, I'd love to hear from
you. Thanks!

--- Sean

+----------------------------------------------------------------------------+
| Sean P. Nolan     | Net: Sean_Nolan@Mac.Dartmouth.EDU |  "Let's face it:   |
| Dartmouth College |                                   |   IBM is no fun."  |
| Hinman Box 2658   |            SCALP 'EM!             |     ::::::::::     |
| Hanover, NH 03755 |                                   |   John C. Dvorak   |
+----------------------------------------------------------------------------+

leonard@bucket.UUCP (Leonard Erickson) (11/24/89)

sean@eleazar.dartmouth.edu (Sean P. Nolan) writes:

<I've got a question about my Model 100. I've gotten an 8085 compiler (thanks
<Chris!) which produces Hex code, so I set about trying to write a BASIC
<program that would load the files into RAM and then SAVEM them as machine
<language files.

<OK. My basic strategy was this:

<* Read in a hex character A$ from the file
<* Convert the hex to decimal
<* Red in next hex character B$
<* Convert the hex to decimal
<* POKE ((A*16)+B) into memory (decimal representation of hex chars)
<* Increment memory
<* repeat until the file is done
<* SAVEM the file.

<OK. The program happily runs along and saves the .co file. But the compiled
<program doesn't run and, in fact, hangs my machine. This tipped me off that
<something was amiss....

<So what am I doing wrong? My best bet is a problem with my SAVEM parameters.
<I loaded the program into RAM at the same address that the ORG statement in
<the original Assembler file dictated, and set the entry point for that
<address as well.

Well, it looks like you made one *fundamental* error. You have to use the
CLEAR statement to set the highest available memory location to a point
*below* where you are loading your program! Otherwise, you've got the string
workspace in BASIC sitting on top of your program! 

Also don't forget that the program has to do such things as return control
to the M100 ROM when it is done...
-- 
Leonard Erickson		...!tektronix!reed!percival!bucket!leonard
CIS: [70465,203]
"I'm all in favor of keeping dangerous weapons out of the hands of fools.
Let's start with typewriters." -- Solomon Short