]> git.sur5r.net Git - cc65/commitdiff
fixed LoadW for doing 16-bit offsets loads, not only constants
authorizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 4 Jun 2002 11:20:29 +0000 (11:20 +0000)
committerizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 4 Jun 2002 11:20:29 +0000 (11:20 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1300 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/geos/inc/geosmac.ca65.inc

index e233ef977f4d64630b2ef76de0bbd99814cd393d..a2517be0acac454c4a7dc7f815e386a096172bcf 100644 (file)
@@ -1,6 +1,6 @@
 
 ;GEOS macros
-;reassembled for 6502TASM/MMS by Maciej 'YTM/Alliance' Witkowiak
+;reassembled for 6502TASM/MMS by Maciej 'YTM/Elysium' Witkowiak
 ;4-2-99
 
 ;28-6-99 - ca65 port
        lda #value
        sta dest
        .endmacro
-       
+
        .macro          LoadW dest, value
-       lda #>value
-       sta dest+1
-       .if (>value)<>(<value)
-           lda #<value
-       .endif
-       sta dest+0
+       LoadB dest+1, >value
+       LoadB dest+0, <value
        .endmacro
-       
+
        .macro          MoveB source, dest
        lda source
        sta dest
        .endmacro
-       
+
        .macro          MoveW source, dest
        MoveB source+1, dest+1
        MoveB source+0, dest+0
        .endmacro
-       
+
        .macro          add source
        clc
        adc source
        .endmacro
-       
+
        .macro          AddB source, dest
        lda source
        add dest
        sta dest
        .endmacro
-       
+
        .macro          AddW source, dest
        AddB source+0, dest+0
        lda source+1
        adc dest+1
        sta dest+1
        .endmacro
-       
+
        .macro          AddVB value, dest
        lda dest
        clc
        adc #value
        sta dest
        .endmacro
-       
+
        .macro          AddVW value, dest
 .local Skip
        clc
        .endif
 Skip:
        .endmacro
-       
+
        .macro          ssub source
        sec
        sbc source
        .endmacro
-       
+
        .macro          SubB source, dest
        lda dest
        ssub source
        sta dest
        .endmacro
-       
+
        .macro          SubW source, dest
        SubB source+0, dest+0
        lda dest+1
        sbc source+1
        sta dest+1
        .endmacro
-       
+
        .macro          SubVW value, dest
        sec
        lda dest+0
@@ -100,17 +96,17 @@ Skip:
        sbc #>value
        sta dest+1
        .endmacro
-       
+
        .macro          CmpB source, dest
        lda source
        cmp dest
        .endmacro
-       
+
        .macro          CmpBI source, immed
        lda source
        cmp #immed
        .endmacro
-       
+
        .macro          CmpW source, dest
 .local Skip    
        CmpB source+1, dest+1
@@ -118,7 +114,7 @@ Skip:
        CmpB source+0, dest+0
 Skip:
        .endmacro
-       
+
        .macro          CmpWI source, immed
 .local Skip
        CmpBI source+1, >immed
@@ -126,32 +122,32 @@ Skip:
        CmpBI source+0, <immed
 Skip:
        .endmacro
-       
+
        .macro          PushB source
        lda source
        pha
        .endmacro
-       
+
        .macro          PushW source
        PushB source+1
        PushB source+0
        .endmacro
-       
+
        .macro          PopB dest
        pla
        sta dest
        .endmacro
-       
+
        .macro          PopW dest
        PopB dest+0
        PopB dest+1
        .endmacro
-       
+
        .macro          bra addr
        clv
        bvc addr
        .endmacro
-       
+
        .macro          smb bitNumber, dest
        pha
        lda #(1 << bitNumber)
@@ -159,13 +155,13 @@ Skip:
        sta dest
        pla
        .endmacro
-       
+
        .macro          smbf bitNumber, dest
        lda #(1 << bitNumber)
        ora dest
        sta dest
        .endmacro
-       
+
        .macro          rmb bitNumber, dest
        pha
        lda #(1 << bitNumber) ^ $ff 
@@ -173,13 +169,13 @@ Skip:
        sta dest
        pla
        .endmacro
-       
+
        .macro          rmbf bitNumber, dest
        lda #(1 << bitNumber) ^ $ff
        ora dest
        sta dest
        .endmacro
-       
+
        .macro          bbs bitNumber, source, addr
 .local Skip
        php
@@ -193,7 +189,7 @@ Skip:
 Skip:  pla
        plp
        .endmacro
-       
+
        .macro          bbsf bitNumber, source, addr
        .if     bitNumber=7
                bit source
@@ -209,7 +205,7 @@ Skip:       pla
                .endif
        .endif
        .endmacro
-       
+
        .macro          bbr bitNumber, source, addr
 .local Skip
        php
@@ -223,7 +219,7 @@ Skip:       pla
 Skip:  pla
        plp
        .endmacro
-       
+
        .macro          bbrf bitNumber, source, addr
        .if bitNumber=7
            bit source
@@ -239,25 +235,25 @@ Skip:     pla
                .endif
        .endif
        .endmacro
-       
+
 ;03.03.99 by Maciej Witkowiak
 
        .macro          addv value
        clc
        adc #value
        .endmacro
-       
+
        .macro          subv value
        sec
        sbc #value
        .endmacro
-       
+
        .macro          bnex addr
        txa
        bne addr
        .endmacro
-       
+
        .macro          beqx addr
        txa
        beq addr
-       .endmacro
\ No newline at end of file
+       .endmacro