A89: Help


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

A89: Help




why is this program giving me an illegal op? i am just beginning to program
assembly, any help is deeply appreciated.

    include "tios.h"
    include "util.h"
                     
    xdef _main
    xdef _comment
    xdef _ti89   

_main:
    move.w   #9,d1
    move.w   #1,d0
    jsr      util::idle_loop
    bsr      text
    rts

text:
    jsr      util::clr_scr          
    move.w   #4,-(a7)               
    lea      string(pc),a0          
    move.l   a0,-(a7)
    move.w   #50,-(a7)              
    move.w   #25,-(a7)              
    jsr      tios::DrawStrXY        
    add.l    #10,(a7)                 
    jsr      util::idle_loop
    sub.w    d0,d1
    move.w   d0,d2
    clr.w    d0
    clr.w    d1
    move.w   #1,d0
    move.w   d2,d1
    jsr      util::idle_loop        
    jsr      util::clr_scr
    jsr      util::idle_loop
    bsr      compare
    rts

compare:
    cmp      d0,d1
    bhi      text
    rts
 
string:
    dc.b "Die by my hand!",0
_comment:
    dc.b "Tim's Program",0

    end


Follow-Ups: