68000 assembly codes and GNU assembler ... 
Author Message
 68000 assembly codes and GNU assembler ...

Hi,

I have trouble compiling this assembly code. Can anyone be
kind enough to offer some advice?

    1. What format of assembly code is it? It does not look like
       68000 codes, although it is supposed to be. (% sign at front
       of a register? & sign at front of a numeric value? what
       register is %sr? "text" instead of ".text"? "global" instead
       of ".globl"? ...)
    2. What options should I configure my GNU assembler in order to
       have it understand this type of assembly language syntax.
       or Should I re-build my assembler with different options?
    3. Is it indeed 68000 assembly codes?

This file is indeed being used, and I have more files like this.
I am porting the software to a different development platform, but
still generating 68000 family codes. The GNU assembler I am using
is GNU V1.6.

Please send your advices to my e-mail account. Thanks in advance!!

chia chen

---- sample assembly file -----

text
        even
        global kputc
kputc:
        link.w %a6,&0
        movm.l &0x3000,-(%sp)
        mov.l 8(%fp),%d3
        mov.b 15(%fp),%d2
        beq L%1
        cmp.b %d2,&10
        bne L%3
        pea 13
        mov.l %d3,-(%sp)
        jsr kputc
L%3:
        lea devtab,%a0
        mov.l %d3,%d0
        asl.l &1,%d0
        add.l %d3,%d0
        asl.l &4,%d0
        mov.l 38(%a0,%d0.l),%a1
        btst &0,47(%a0,%d0.l)
        beq L%4
        add.w &16,%a1
L%4:
L%5:
        mov.b 3(%a1),%d0
        btst &2,%d0
        beq L%5
        mov.b %d2,7(%a1)
L%7:
        mov.b 3(%a1),%d0
        btst &2,%d0
        beq L%7
L%1:
        movm.l -8(%a6),&0xc
        unlk %a6
        rts
        even
        global savestate
savestate:
        link.w %a6,&0
        mov.l %d2,-(%sp)
        mov.l 8(%fp),%d2
        pea 9984
        jsr m_mtsr
        mov.w %d0,saveps
        tst.l bugsccim
        beq L%10
        mov.l bugsccim,%a0
        mov.b (%a0),saveim
        clr.b (%a0)
L%10:
        lea devtab,%a0
        mov.l %d2,%d0
        asl.l &1,%d0
        add.l %d2,%d0
        asl.l &4,%d0
        mov.l 38(%a0,%d0.l),%a0
        clr.b 11(%a0)
        mov.l -4(%a6),%d2
        unlk %a6
        rts
        even
        global rststate
rststate:
        link.w %a6,&0
        mov.l 8(%fp),%d0
        lea devtab,%a0
        mov.l %d0,%d1
        asl.l &1,%d1
        add.l %d0,%d1
        asl.l &4,%d1
        mov.l 38(%a0,%d1.l),%a0
        tst.l bugsccim
        beq L%12
        mov.b saveim,11(%a0)
        mov.l bugsccim,%a0
        mov.b saveim,(%a0)
L%12:
        mov.w saveps,%a1
        mov.l %a1,-(%sp)
        jsr m_mtsr
        unlk %a6
        rts
        lcomm saveim,2
        lcomm saveps,2



Sun, 28 Mar 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. 68000 Assembler source code?

2. 68000 Assembly Code

3. 68000 to 80256 assembly code - please help !

4. 68000 to 80256 assembly code- please help !

5. problem porting assembly codes from ms inline assembly to linux (gnu - AT&T syntax)

6. 68000 assembler help

7. ANN: Asm68k (68000 assembler for the PalmPilot)

8. F83 68000 Assembler Source ?

9. 68000/486 cross assembler

10. Wanted - 68000 Assembler hackers to correspond with

11. PC 80x86/68000 hybrid Macro Assembler

12. PC 80x86/68000 hybrid Macro Assembler

 

 
Powered by phpBB® Forum Software