]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/_heapadd.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / common / _heapadd.s
index 547e0478b0c433c42898f5b4826315651ee638c7..14080cb5e42be68a8abb6201d9c1e8c54db8260d 100644 (file)
@@ -7,46 +7,46 @@
 ;
 ;
 
-       .importzp       ptr1, ptr2
-       .import         popax
-       .import         heapadd
-               .export         __heapadd
+        .importzp       ptr1, ptr2
+        .import         popax
+        .import         heapadd
+        .export         __heapadd
 
         .include        "_heap.inc"
 
-               .macpack        generic
+        .macpack        generic
 
 ;-----------------------------------------------------------------------------
 ; Code
 
 __heapadd:
-       sta     ptr1            ; Store size in ptr1
-       stx     ptr1+1
-       jsr     popax           ; Get the block pointer
-               sta     ptr2
-       stx     ptr2+1          ; Store block pointer in ptr2
+        sta     ptr1            ; Store size in ptr1
+        stx     ptr1+1
+        jsr     popax           ; Get the block pointer
+        sta     ptr2
+        stx     ptr2+1          ; Store block pointer in ptr2
 
 ; Check if size is greater or equal than min_size. Otherwise we don't care
 ; about the block (this may only happen for user supplied blocks, blocks
 ; from the heap are always large enough to hold a freeblock structure).
 
-       lda     ptr1            ; Load low byte
-       ldx     ptr1+1          ; Load/check high byte
-       bne     @L1
-       cmp     #HEAP_MIN_BLOCKSIZE
-       bcs     @L1
+        lda     ptr1            ; Load low byte
+        ldx     ptr1+1          ; Load/check high byte
+        bne     @L1
+        cmp     #HEAP_MIN_BLOCKSIZE
+        bcs     @L1
 
-       rts                     ; Block not large enough
+        rts                     ; Block not large enough
 
 ; The block is large enough. Set the size field in the block.
 
-@L1:   ldy     #usedblock::size
-       sta     (ptr2),y
-       iny
-       txa
-       sta     (ptr2),y
+@L1:    ldy     #usedblock::size
+        sta     (ptr2),y
+        iny
+        txa
+        sta     (ptr2),y
 
 ; Call the internal function since variables are now setup correctly
 
-       jmp     heapadd
+        jmp     heapadd