dragon: Fix put/get copy index post-increment
authorTormod Volden <debian.tormod@gmail.com>
Mon, 9 Mar 2015 23:47:39 +0000 (00:47 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 9 Mar 2015 23:58:56 +0000 (23:58 +0000)
Because 6809 assembly is not a C dialect or something :p

Alternatively we could do it in steps of 2 by using D instead
of A but then we must change the check for zero Y.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Kernel/platform-dragon/usermem_sam.s

index 5bfead7..22db45f 100644 (file)
@@ -46,9 +46,9 @@ __uget:
        ldy 9,s         ; count
        orcc #0x10
 ugetl:
-       lda ,x++
+       lda ,x+
        SAM_USER
-       sta ,u++
+       sta ,u+
        SAM_KERNEL
        leay -1,y
        cmpy #0
@@ -62,10 +62,10 @@ __ugets:
        orcc #0x10
 ugetsl:
        SAM_USER
-       lda ,x++
+       lda ,x+
        beq ugetse
        SAM_KERNEL
-       sta ,u++
+       sta ,u+
        leay -1,y
        cmpy #0
        bne ugetsl
@@ -108,9 +108,9 @@ __uput:
        ldu 7,s         ; user address
        ldy 9,s         ; count
 uputl:
-       lda ,x++
+       lda ,x+
        SAM_USER
-       sta ,u++
+       sta ,u+
        SAM_KERNEL
        leay -1,y
        cmpy #0