Re: A92: Fargo Kit Bug
[Prev][Next][Index][Thread]
Re: A92: Fargo Kit Bug
No, it is a bug.
I used a debugger to view program files when they were already on the calculator
Hence the instruction jsr $0000000 was actually executed, causing a crash.
When the programs did compile correctly, or when they were linked correctly, or
tios.o did its job correctly, or whatever, the jsr instructions pointed to places
in ROM and the programs ran correctly
Bryan Christopher Turner wrote:
> >
> > 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
References: