On Sep 18 2024, Ole Streicher wrote:

> As IRAF is a 40-year old package, there was already some assembler that 
> was used ~35 years ago [2]:
>
>          .text
>          .globl  _zsvjmp_
>
>          JMPBUF       =       4
>          STATUS  =       8
>
> _zsvjmp_:                     |# CALL ZSVJMP (JMPBUF, STATUS)
>          movl    sp@(JMPBUF),a0       |# set A0 to point to jmp_buf
>          movl    sp@(STATUS),a1       |# A1 = status variable
>          movl    a1,a0@               |# JB[0] = addr of status variable
>       clrl    a1@             |# return zero status
>       addql   #4,sp@(JMPBUF)  |# skip first cell of jmp_buf
>          jmp     _setjmp              |# let setjmp do the rest.
>
> However, just including this does not work because assembler syntax 
> changed [3].

Registers need to be prefixed with %, and assembler labels for C symbols
do not have a _ prefix.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

Reply via email to