Re: A92: Fargo Kit Bug


[Prev][Next][Index][Thread]

Re: A92: Fargo Kit Bug





>
> I think this is definitely a bug.  Once again, jsr    tios::______
> instructions are converted to jsr    $000000000, causing Illegal
> instruction crashes, Line 111 errors, and other juicy stuff.  This
> happens without a warning; I compile a program, send it, and it works
> fine, I make routine changes to it, and this begins to happen.  After
> that, even well tested code (asm\prgm\*.asm) will be screwed up in this
> way.  This is either a problem with flinker or with fargo core.  A
> solution to this would be much appriciated.
>


  This is NOT a bug!  That code is compiling correctly!  The assembled Fargo
programs should have jsr $0 references to everything (libraries/TI-OS) that are
not in the code bieng assembled.  THEN, when you run the program, Fargo should
edit these pointers to the correct value.  Here's a test to be sure it's
working right:
  Assemble a program with these lines in it:

test:
   jsr    test2
   jsr    tios::ER_Catch
   move.w #tios::LCD_Addr,d0
   move.w (tios::LCD_Addr+$1C),d0

test2:
   rts

The program should compile into something like:
   $4ef9 xxxx xxxx <-- An actual address or offset
   $4ef9 0000 0000 <-- All zeros (replaced by address when running)
   $2xxx 0000      <-- Again, zeros (replaced by $4440 when running)
   $2xxx 001C      <-- Notice offset is here ($4440 added when running)

The test is the last line, notice the offset $1C was put in the actual data of
the instruction.  If this is not present, then the assembler or linker is
incorrect.  If this is correct, then it's probably the program which converts
the assembler output into a Fargo program that is messing up.

--Bryan
bcturner@eos.ncsu.edu