[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [N8VEM: 2633] Re: A0> A1> user patch



Looks like the CP 09 should be CP 10, and the ADD A,31H should be a LD A,31H.


Terry


James Moxham (Dr_Acula) wrote:
Minor bug - won't display 9 to 15 correctly. Rich, can you just double
check the code below and maybe post the original 8080 code...

USRPAT:

UPAT1:	CALL	GETUSR			;call ccp routine to
					; get current user number.
	CP	09			;check if zero thru nine
					; or if two digits
					; ten thru fifteen.
	JP	NC,UPDBL		;jump if two digits.
	ADD	A,30h			;else convert to ascii.
UPSING:	CALL	PRINT			;call ccp conout routine.
	RET				;return where ccp left off.
					;
UPDBL:	ADD	A,26h			;subtract 10 from the user
					; number; the remainder
					; will be the second digit.
					; Add 30 to convert it to
					; ascii or just add 26h to
					; accomplish both.
	PUSH	AF			;save the second digit
	ADD	A,31h			;load an ascii 'one'
	CALL	PRINT			;call ccp conout routine
	POP	AF			;return second digit
	JP	UPSING			;output second digit
					; and return
	RET