A89: Exec


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

A89: Exec




Yes another question about exec. :)

Ok, I tried to modify Johan's key autorepeat program to accept parameters. 
The asm code is below, if you are interested.

I tried to run it at the home like this :

Exec “227800C8206909204E90544F206909244E904E750000” ,18,70

It blew up, and I don’t have access to a screwdriver. :(  Address Error.  
Yeah the evil one with the black lines at the top. :)

It might be pushing two long words on the stack.  Does anyone know how to 
tell it how to just push a word?  If that is not it, could someone look 
through the asm code.  Thank you.  I appreciate the help!


Assembly language:

xdef _main

_main:
                       ; I don't need to push any registers
  move.l 200,a1        ; get start of ROM table
  move.l $920(a1),a0   ; get address of OSInitKeyInitDelay
  jsr (a0)             ; do it.  Parameters should be on stack.

  addq.w #2,a7         ; get rid of first parameter
  move.l $924(a1),a0   ; get address of OSInitBetweenKeyDelay
  jsr (a0)             ; do it, with the second parameter

  rts
  dc.w 0               ; end of TI relocation table

  end


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com