Re: Help needed: small piece of assembler code for IRAF

Andreas Schwab <[email protected]>
Newsgroups gmane.linux.debian.ports.68k
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.