A83: Compare from 'hl'...?


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

A83: Compare from 'hl'...?




Whats the best way to test a 16-Bit Number in 'hl'?  I'm using Linus' new Menu
Emulator and when you choose an item from the menu, it outputs a value to
'hl'... If you choose from the first submenu, its a number from 1-256 and I
know how to test that with a compare, but from the other submenus, the value
is a 16-Bit Number... how do I test for that? Would this routine work...? My
program crashes, but Im not sure if its this routine or something else, but
can somebody check this or give me a better way...? Thanks. =)
																--Jason K.
;choosing the first item from the 2nd submenu,
;it outputs the value '257' to 'hl'...

	ld a, 255
	call _SETXXOP1
	call _PLUS1
	call _SETXXXXOP2
	call _INVSUB
	call _OP2TOOP1
	call _CONVOP1
	ex de, hl
	ld a, l
	cp 1
	jp z, Label
	etc...