Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 2 additions & 23 deletions library-asm/mul16.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,10 @@ __MUL16: ; Mutiplies HL with the last value stored into de stack
pop hl ; Return address
ex (sp), hl ; CALLEE caller convention

;;__MUL16_FAST: ; __FASTCALL ENTRY: HL = 1st operand, DE = 2nd Operand
;; ld c, h
;; ld a, l ; C,A => 1st Operand
;;
;; ld hl, 0 ; Accumulator
;; ld b, 16
;;
;;__MUL16LOOP:
;; sra c ; C,A >> 1 (Arithmetic)
;; rra
;;
;; jr nc, __MUL16NOADD
;; add hl, de
;;
;;__MUL16NOADD:
;; sla e
;; rl d
;;
;; djnz __MUL16LOOP

__MUL16_FAST:
ld b, 16
ld a, d
ld c, e
ex de, hl
ld a, h
ld c, l
ld hl, 0

__MUL16LOOP:
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/27.asm
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,9 @@ __MEM_START:
__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
ld a, h ; HL = NULL (No memory available?)
or l
#line 111 "/src/zxb/trunk/library-asm/alloc.asm"
#line 111 "/zbasic/library-asm/alloc.asm"
ret z ; NULL
#line 113 "/src/zxb/trunk/library-asm/alloc.asm"
#line 113 "/zbasic/library-asm/alloc.asm"
; HL = Pointer to Free block
ld e, (hl)
inc hl
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/28.asm
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,9 @@ __MEM_START:
__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
ld a, h ; HL = NULL (No memory available?)
or l
#line 111 "/src/zxb/trunk/library-asm/alloc.asm"
#line 111 "/zbasic/library-asm/alloc.asm"
ret z ; NULL
#line 113 "/src/zxb/trunk/library-asm/alloc.asm"
#line 113 "/zbasic/library-asm/alloc.asm"
; HL = Pointer to Free block
ld e, (hl)
inc hl
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/29.asm
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ __MEM_START:
__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
ld a, h ; HL = NULL (No memory available?)
or l
#line 111 "/src/zxb/trunk/library-asm/alloc.asm"
#line 111 "/zbasic/library-asm/alloc.asm"
ret z ; NULL
#line 113 "/src/zxb/trunk/library-asm/alloc.asm"
#line 113 "/zbasic/library-asm/alloc.asm"
; HL = Pointer to Free block
ld e, (hl)
inc hl
Expand Down
35 changes: 7 additions & 28 deletions tests/functional/46.asm
Original file line number Diff line number Diff line change
Expand Up @@ -75,31 +75,10 @@ __MUL16: ; Mutiplies HL with the last value stored into de stack
pop hl ; Return address
ex (sp), hl ; CALLEE caller convention

;;__MUL16_FAST: ; __FASTCALL ENTRY: HL = 1st operand, DE = 2nd Operand
;; ld c, h
;; ld a, l ; C,A => 1st Operand
;;
;; ld hl, 0 ; Accumulator
;; ld b, 16
;;
;;__MUL16LOOP:
;; sra c ; C,A >> 1 (Arithmetic)
;; rra
;;
;; jr nc, __MUL16NOADD
;; add hl, de
;;
;;__MUL16NOADD:
;; sla e
;; rl d
;;
;; djnz __MUL16LOOP

__MUL16_FAST:
ld b, 16
ld a, d
ld c, e
ex de, hl
ld a, h
ld c, l
ld hl, 0

__MUL16LOOP:
Expand All @@ -118,7 +97,7 @@ __MUL16NOADD:

#line 20 "array.asm"

#line 24 "/src/zxb/trunk/library-asm/array.asm"
#line 24 "/zbasic/library-asm/array.asm"

__ARRAY:
PROC
Expand All @@ -141,10 +120,10 @@ __ARRAY:
ld hl, 0 ; BC = Offset "accumulator"

LOOP:
#line 49 "/src/zxb/trunk/library-asm/array.asm"
#line 49 "/zbasic/library-asm/array.asm"
pop bc ; Get next index (Ai) from the stack

#line 59 "/src/zxb/trunk/library-asm/array.asm"
#line 59 "/zbasic/library-asm/array.asm"

add hl, bc ; Adds current index

Expand Down Expand Up @@ -174,7 +153,7 @@ ARRAY_END:
push de
exx

#line 92 "/src/zxb/trunk/library-asm/array.asm"
#line 92 "/zbasic/library-asm/array.asm"
LOCAL ARRAY_SIZE_LOOP

ex de, hl
Expand Down Expand Up @@ -205,7 +184,7 @@ ARRAY_SIZE_LOOP:

;add hl, de
;__ARRAY_FIN:
#line 123 "/src/zxb/trunk/library-asm/array.asm"
#line 123 "/zbasic/library-asm/array.asm"

pop de
add hl, de ; Adds element start
Expand Down
35 changes: 7 additions & 28 deletions tests/functional/47.asm
Original file line number Diff line number Diff line change
Expand Up @@ -102,31 +102,10 @@ __MUL16: ; Mutiplies HL with the last value stored into de stack
pop hl ; Return address
ex (sp), hl ; CALLEE caller convention

;;__MUL16_FAST: ; __FASTCALL ENTRY: HL = 1st operand, DE = 2nd Operand
;; ld c, h
;; ld a, l ; C,A => 1st Operand
;;
;; ld hl, 0 ; Accumulator
;; ld b, 16
;;
;;__MUL16LOOP:
;; sra c ; C,A >> 1 (Arithmetic)
;; rra
;;
;; jr nc, __MUL16NOADD
;; add hl, de
;;
;;__MUL16NOADD:
;; sla e
;; rl d
;;
;; djnz __MUL16LOOP

__MUL16_FAST:
ld b, 16
ld a, d
ld c, e
ex de, hl
ld a, h
ld c, l
ld hl, 0

__MUL16LOOP:
Expand All @@ -145,7 +124,7 @@ __MUL16NOADD:

#line 20 "array.asm"

#line 24 "/src/zxb/trunk/library-asm/array.asm"
#line 24 "/zbasic/library-asm/array.asm"

__ARRAY:
PROC
Expand All @@ -168,10 +147,10 @@ __ARRAY:
ld hl, 0 ; BC = Offset "accumulator"

LOOP:
#line 49 "/src/zxb/trunk/library-asm/array.asm"
#line 49 "/zbasic/library-asm/array.asm"
pop bc ; Get next index (Ai) from the stack

#line 59 "/src/zxb/trunk/library-asm/array.asm"
#line 59 "/zbasic/library-asm/array.asm"

add hl, bc ; Adds current index

Expand Down Expand Up @@ -201,7 +180,7 @@ ARRAY_END:
push de
exx

#line 92 "/src/zxb/trunk/library-asm/array.asm"
#line 92 "/zbasic/library-asm/array.asm"
LOCAL ARRAY_SIZE_LOOP

ex de, hl
Expand Down Expand Up @@ -232,7 +211,7 @@ ARRAY_SIZE_LOOP:

;add hl, de
;__ARRAY_FIN:
#line 123 "/src/zxb/trunk/library-asm/array.asm"
#line 123 "/zbasic/library-asm/array.asm"

pop de
add hl, de ; Adds element start
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/48.asm
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,9 @@ __MEM_START:
__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
ld a, h ; HL = NULL (No memory available?)
or l
#line 111 "/src/zxb/trunk/library-asm/alloc.asm"
#line 111 "/zbasic/library-asm/alloc.asm"
ret z ; NULL
#line 113 "/src/zxb/trunk/library-asm/alloc.asm"
#line 113 "/zbasic/library-asm/alloc.asm"
; HL = Pointer to Free block
ld e, (hl)
inc hl
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/49.asm
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,9 @@ __MEM_START:
__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
ld a, h ; HL = NULL (No memory available?)
or l
#line 111 "/src/zxb/trunk/library-asm/alloc.asm"
#line 111 "/zbasic/library-asm/alloc.asm"
ret z ; NULL
#line 113 "/src/zxb/trunk/library-asm/alloc.asm"
#line 113 "/zbasic/library-asm/alloc.asm"
; HL = Pointer to Free block
ld e, (hl)
inc hl
Expand Down
35 changes: 7 additions & 28 deletions tests/functional/55.asm
Original file line number Diff line number Diff line change
Expand Up @@ -70,31 +70,10 @@ __MUL16: ; Mutiplies HL with the last value stored into de stack
pop hl ; Return address
ex (sp), hl ; CALLEE caller convention

;;__MUL16_FAST: ; __FASTCALL ENTRY: HL = 1st operand, DE = 2nd Operand
;; ld c, h
;; ld a, l ; C,A => 1st Operand
;;
;; ld hl, 0 ; Accumulator
;; ld b, 16
;;
;;__MUL16LOOP:
;; sra c ; C,A >> 1 (Arithmetic)
;; rra
;;
;; jr nc, __MUL16NOADD
;; add hl, de
;;
;;__MUL16NOADD:
;; sla e
;; rl d
;;
;; djnz __MUL16LOOP

__MUL16_FAST:
ld b, 16
ld a, d
ld c, e
ex de, hl
ld a, h
ld c, l
ld hl, 0

__MUL16LOOP:
Expand All @@ -113,7 +92,7 @@ __MUL16NOADD:

#line 20 "array.asm"

#line 24 "/src/zxb/trunk/library-asm/array.asm"
#line 24 "/zbasic/library-asm/array.asm"

__ARRAY:
PROC
Expand All @@ -136,10 +115,10 @@ __ARRAY:
ld hl, 0 ; BC = Offset "accumulator"

LOOP:
#line 49 "/src/zxb/trunk/library-asm/array.asm"
#line 49 "/zbasic/library-asm/array.asm"
pop bc ; Get next index (Ai) from the stack

#line 59 "/src/zxb/trunk/library-asm/array.asm"
#line 59 "/zbasic/library-asm/array.asm"

add hl, bc ; Adds current index

Expand Down Expand Up @@ -169,7 +148,7 @@ ARRAY_END:
push de
exx

#line 92 "/src/zxb/trunk/library-asm/array.asm"
#line 92 "/zbasic/library-asm/array.asm"
LOCAL ARRAY_SIZE_LOOP

ex de, hl
Expand Down Expand Up @@ -200,7 +179,7 @@ ARRAY_SIZE_LOOP:

;add hl, de
;__ARRAY_FIN:
#line 123 "/src/zxb/trunk/library-asm/array.asm"
#line 123 "/zbasic/library-asm/array.asm"

pop de
add hl, de ; Adds element start
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/addstr.asm
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,9 @@ __MEM_START:
__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
ld a, h ; HL = NULL (No memory available?)
or l
#line 111 "/src/zxb/trunk/library-asm/alloc.asm"
#line 111 "/zbasic/library-asm/alloc.asm"
ret z ; NULL
#line 113 "/src/zxb/trunk/library-asm/alloc.asm"
#line 113 "/zbasic/library-asm/alloc.asm"
; HL = Pointer to Free block
ld e, (hl)
inc hl
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/aloadstr0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ __MEM_START:
__MEM_LOOP: ; Loads lengh at (HL, HL+). If Lenght >= BC, jump to __MEM_DONE
ld a, h ; HL = NULL (No memory available?)
or l
#line 111 "/src/zxb/trunk/library-asm/alloc.asm"
#line 111 "/zbasic/library-asm/alloc.asm"
ret z ; NULL
#line 113 "/src/zxb/trunk/library-asm/alloc.asm"
#line 113 "/zbasic/library-asm/alloc.asm"
; HL = Pointer to Free block
ld e, (hl)
inc hl
Expand Down
Loading