	title	Module from library INTEGER_1 : C1632
	name	('C1632')
	maclib	baselib.lib

; Copyright (C)	Werner Cirsovius
;		Hohe Weide 44
;		D-20253 Hamburg
;		Tel.: +49-40-4223247

;		Version 1.0 October 1989

; Convert 16 bit signed number to 32 bits

; ENTRY	Reg HL holds signed number
;	Reg DE points to location holding 32 bits

; EXIT	Result filled with 32 bits

	entry	c1632

c1632:
	push	ix
	push	de
	pop	ix
	ld	(ix+2),h	; Set 16 bit part
	ld	(ix+3),l
	xor	a
	bit	sign,(ix+2)	; Check sign
	jr	z,no.sign
	dec	a
no.sign:
	ld	(ix+0),a	; Set hi bits
	ld	(ix+1),a
	pop	ix
	ret

	end

