Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

help on MC68040 program

Could anyone help me write a 68040 program that sends Status?
The code must be written for an 68040 CPU. It wil execute in user mode, with interrupt disabled.On entry to a command processor, the following items are on the stack:
(sp+0)Return address
(sp+4)Address of an array of system pointers,
The "array of system pointers" contains:
offset 24 - address of network "receive data" routine
offset 28 - address of network "send data" routine
offset 32 - address of network "send status" routine

What is wrong with this code:

command:
movea.l 4(sp),a2
jsr ([32,a2])
rts

???
What i miss?


Comments

  • CytCyt Member Posts: 557
    : What is wrong with this code:
    :
    : command:
    : movea.l 4(sp),a2
    : jsr ([32,a2])
    : rts

    Does it compile?

    If yes, I can't help you, but suggest you to debug it.

    If not, try this:
    [code]
    move.l 4(sp),a2
    jmp 32(a2) ; same as jsr+rts
    [/code]

Sign In or Register to comment.