Re: A89: Error: 16-bit relocations are unsupported(2nd postion)


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

Re: A89: Error: 16-bit relocations are unsupported(2nd postion)




In a message dated 99-01-03 16:00:47 EST, you write:

Anyone figure this out yet?  It seems to be giving me the biggest
headache...c'mon guys I know one of you know what causes this 16-bit
error...PLEASE HELP ME...

Maybe to get things going I will tell you what is going on...First "Tic Tac
Toe" is displayed in a title screen waiting for a key press...After the key
press the tic tac toe grid is displayed...Then a box is printed in section 1
of the grid...Now idle_loop is called again waiting for a keypress...Depending
on which arrow key is pressed the box_sprite is displayed accordingly...ie: if
down is pressed when box is in position 1 then erase position 1 and goto
position 4...Please someone help me with this error...I just can't figure it
out


<< Does anyone know what this error means?  What are relocations?  Here is the
 code that is giving the error:
      include "tios.h"
      include "util.h"
      include "linelib.h"
      include "graphlib.h"
 
      xdef _main
      xdef _comment
      xdef _ti89
 
 _main:
      jsr util::clr_scr
      move.w #2,-(a7)
      jsr tios::FontSetSys
      add.l #2,a7
      move.w #4,-(a7)
      pea tic(pc)
      move.w #0,-(a7)
      move.w #0,-(a7)
      jsr tios::DrawStrXY
      add.l #10,a7
      jsr util::idle_loop
      jsr util::clr_scr
      bsr drawgrid
 ;----program begins here----
 
 ;-------------------------POSITION 1-------------------------------
 Pos1:
      move.w #49,box_x;set box in position1
      move.w #15,box_y
      bsr box_sprite_setup
      jsr util::idle_loop
 test_up:
      cmp.w #338,d0
      bne test_down
      bsr box_erase_setup
      bra Pos7
 test_down:
      cmp.w #344,d0
      bne test_right
      bsr box_erase_setup
      bra Pos4
  test_right:
      cmp.w #340,d0
      bne test_left
      bsr box_erase_setup
      bra Pos2
 test_left:
      cmp.w #337,d0
      bne test_up
      bsr box_erase_setup
      bra Pos3
 
 ;-----------------------------------POSITION
 2------------------------------------
 
 Pos2:
      move.w #71,box_x;set box in position2
      move.w #15,box_y
      bsr box_sprite_setup
      jsr util::idle_loop
 test_up2:
      cmp.w #338,d0
      bne test_down2
      bsr box_erase_setup
      bra Pos8
 test_down2:
      cmp.w #344,d0
      bne test_right2
      bsr box_erase_setup
      bra Pos5
  test_right2:
      cmp.w #340,d0
      bne test_left2
      bsr box_erase_setup
      bra Pos3
 test_left2:
      cmp.w #337,d0
      bne test_up2
      bsr box_erase_setup
      bra Pos1
 
 ;---------------------------------------------POSITION
 3-----------------------------------------------
 Pos3:
      move.w #93,box_x;set box in position1
      move.w #15,box_y
      bsr box_sprite_setup
      jsr util::idle_loop
 test_up3:
      cmp.w #338,d0
      bne test_down3
      bsr box_erase_setup
      bra Pos9
 test_down3:
      cmp.w #344,d0
      bne test_right3
      bsr box_erase_setup
      bra Pos6
  test_right3:
      cmp.w #340,d0
      bne test_left3
      bsr box_erase_setup
      bra Pos1
 test_left3:
      cmp.w #337,d0
      bne test_up3
      bsr box_erase_setup
      bra Pos2
 
 ;----------------------------------------------POSITION
 4---------------------------------------------------------
 Pos4:
      move.w #49,box_x;set box in position1
      move.w #37,box_y
      bsr box_sprite_setup
      jsr util::idle_loop
 test_up4:
      cmp.w #338,d0
      bne test_down4
      bsr box_erase_setup
      bra Pos1
 test_down4:
      cmp.w #344,d0
      bne test_right4
      bsr box_erase_setup
      bra Pos7
  test_right4:
      cmp.w #340,d0
      bne test_left4
      bsr box_erase_setup
      bra Pos5
 test_left4:
      cmp.w #337,d0
      bne test_up4
      bsr box_erase_setup
      bra Pos6
 
 ;---------------------------------------POSITION
 5----------------------------------------
 Pos5:
      move.w #71,box_x;set box in position1
      move.w #37,box_y
      bsr box_sprite_setup
      jsr util::idle_loop
 test_up5:
      cmp.w #338,d0
      bne test_down5
      bsr box_erase_setup
      bra Pos2
 test_down5:
      cmp.w #344,d0
      bne test_right5
      bsr box_erase_setup
      bra Pos8
  test_right5:
      cmp.w #340,d0
      bne test_left5
      bsr box_erase_setup
      bra Pos6
 test_left5:
      cmp.w #337,d0
      bne test_up5
      bsr box_erase_setup
      bra Pos4
 
 ;----------------------------------------POSITION
 6-------------------------------------------
 Pos6:
      move.w #93,box_x;set box in position1
      move.w #37,box_y
      bsr box_sprite_setup
      jsr util::idle_loop
 test_up6:
      cmp.w #338,d0
      bne test_down6
      bsr box_erase_setup
      bra Pos3
 test_down6:
      cmp.w #344,d0
      bne test_right6
      bsr box_erase_setup
      bra Pos9
  test_right6:
      cmp.w #340,d0
      bne test_left6
      bsr box_erase_setup
      bra Pos4
 test_left6:
      cmp.w #337,d0
      bne test_up6
      bsr box_erase_setup
      bra Pos5
 
 ;-------------------------------------POSITION
 7---------------------------------------
 Pos7:
      move.w #49,box_x;set box in position1
      move.w #59,box_y
      bsr box_sprite_setup
      jsr util::idle_loop
 test_up7:
      cmp.w #338,d0
      bne test_down7
      bsr box_erase_setup
      bra Pos4
 test_down7:
      cmp.w #344,d0
      bne test_right7
      bsr box_erase_setup
      bra Pos1
  test_right7:
      cmp.w #340,d0
      bne test_left7
      bsr box_erase_setup
      bra Pos8
 test_left7:
      cmp.w #337,d0
      bne test_up7
      bsr box_erase_setup
      bra Pos9
 
 ;---------------------------------------------POSITION
 8----------------------------------------------------
 Pos8:
      move.w #71,box_x;set box in position1
      move.w #59,box_y
      bsr box_sprite_setup
      jsr util::idle_loop
 test_up8:
      cmp.w #338,d0
      bne test_down8
      bsr box_erase_setup
      bra Pos5
 test_down8:
      cmp.w #344,d0
      bne test_right8
      bsr box_erase_setup
      bra Pos2
  test_right8:
      cmp.w #340,d0
      bne test_left8
      bsr box_erase_setup
      bra Pos9
 test_left8:
      cmp.w #337,d0
      bne test_up8
      bsr box_erase_setup
      bra Pos7
 
 ;------------------------------------------POSITION
 9-------------------------------------------------
 Pos9:
      move.w #93,box_x;set box in position1
      move.w #59,box_y
      bsr box_sprite_setup
      jsr util::idle_loop
 test_up9:
      cmp.w #338,d0
      bne test_down9
      bsr box_erase_setup
      bra Pos6
 test_down9:
      cmp.w #344,d0
      bne test_right9
      bsr box_erase_setup
      bra Pos3
  test_right9:
      cmp.w #340,d0
      bne test_left9
      bsr box_erase_setup
      bra Pos7
 test_left9:
      cmp.w #337,d0
      bne test_up9
      bsr box_erase_setup
      bra Pos8
 
      rts
 
 
 
 box_sprite_setup:
      move.w #box_x,d0
      move.w #box_y,d1
      move.l #box_sprite,a0;displays box
      jsr graphlib::put_sprite
      rts
 
 box_erase_setup:
      move.w #box_x,d0
      move.w #box_y,d1
      move.l #box_sprite_erase,a0;erases box
      jsr graphlib::put_sprite
      rts
 
 drawgrid:
      move.l #LCD_MEM,a0;line 1
      move.w #47,d0
      move.w #57,d1
      move.w #113,d2
      move.w #57,d3
      jsr linelib::fline
 
      move.l #LCD_MEM,a0;line 2
      move.w #47,d0
      move.w #35,d1
      move.w #113,d2
      move.w #35,d3
      jsr linelib::fline
 
      move.l #LCD_MEM,a0;line 3
      move.w #69,d0
      move.w #79,d1
      move.w #69,d2
      move.w #13,d3
      jsr linelib::fline
 
      move.l #LCD_MEM,a0;line 4
      move.w #91,d0
      move.w #79,d1
      move.w #91,d2
      move.w #13,d3
      jsr linelib::fline
 
      rts
 
 box_sprite:
 
      dc.w 19
      dc.w 3
      dc.b %11111111,%11111111,%11100000;1
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000;10
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %11111111,%11111111,%11100000;19
 
 mask:
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000;10
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000;19
 
 box_sprite_erase:
      dc.w 19
      dc.w 3
      dc.b %00000000,%00000000,%00000000;1
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000;10
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000
      dc.b %00000000,%00000000,%00000000;18
      dc.b %00000000,%00000000,%00000000
 
 mask2:
      dc.b %11111111,%11111111,%11100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000;10
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %10000000,%00000000,%00100000
      dc.b %11111111,%11111111,%11100000;19
 
 
 box_x dc.w 0
 
 box_y dc.w 0
 
 tic:	
      dc.b "Tic Tac Toe",0
 _comment:
      dc.b "Tic Tac Toe",0
 
      end
 I know that when this is run it will be stuck forever and not be able to
 exit...I just did this and I guess I am too lazy to do any more...But what is
 the 16-bit error?  Maybe if it was explained I could try to figure what is
 wrong by myself...The code is very simple yet unnecessarily large...Actually
 while it is posted maybe someone can give me a few hints on how to make it
 smaller...
 
 THANKS
  -Steven-  >>