62 lines
1.1 KiB
NASM
62 lines
1.1 KiB
NASM
|
; void _IncrementUnsArr(a)
|
||
|
;
|
||
|
; ARGUMENT
|
||
|
; unsigned *a;
|
||
|
;
|
||
|
; DESCRIPTION
|
||
|
; given the address of a unsigned array, increment the
|
||
|
; number and return the result to the structure.
|
||
|
;
|
||
|
; SIDE EFFECTS
|
||
|
; None.
|
||
|
;
|
||
|
; RETURNS
|
||
|
; None. (assume no overflow)
|
||
|
;
|
||
|
; AUTHOR
|
||
|
; Andy Anderson 13-JAN-1987 16:30
|
||
|
; Copyright (C) 1987-90 Greenleaf Software Inc. All Rights Reserved.
|
||
|
;
|
||
|
; MODIFICATIONS
|
||
|
; aa 08-JUL-87 n-bit
|
||
|
;
|
||
|
; jl 7/12/89 sped up, removed n parameter
|
||
|
|
||
|
include model.h
|
||
|
include prologue.h
|
||
|
include gm.equ
|
||
|
|
||
|
|
||
|
pseg gmath
|
||
|
;
|
||
|
; if large memory model then:
|
||
|
;
|
||
|
; parm1_ = ptr to source 1
|
||
|
;
|
||
|
; for if small model then
|
||
|
; parm1_ = ptr to source1
|
||
|
;
|
||
|
cproc _IncrementUnsArr,,_ginc
|
||
|
|
||
|
if _LDATA
|
||
|
push ds
|
||
|
lds si,parm1_ ; ptr to a
|
||
|
else
|
||
|
mov si,parm1_
|
||
|
endif
|
||
|
|
||
|
inclp:
|
||
|
inc word ptr [si]
|
||
|
jnz exit
|
||
|
inc si
|
||
|
inc si
|
||
|
jmp short inclp
|
||
|
|
||
|
exit:
|
||
|
if _LDATA
|
||
|
pop ds
|
||
|
endif
|
||
|
cproce
|
||
|
endps
|
||
|
END
|