viewxyz
        ld hl,(camX) ;mouse X
        ld de,mousex
        call Num2Dec        
        ld hl,mousex
        ld de,#5067;#50e7;#4027
        ld b,5
simbolx
	ld a,(hl)
        push bc
        push hl
	call showdig
        pop hl
        pop bc
        inc hl
        djnz simbolx
        
        ld hl,(camY) ;mouse Y
        ld de,mousey
        call Num2Dec        
        ld hl,mousey
        ld de,#506d;#50ed;#402d
        ld b,5
simboly
	ld a,(hl)
        push bc
        push hl
	call showdig
        pop hl
        pop bc
        inc hl
        djnz simboly
        
        ld hl,(mcamz) ;mouse Z
        ld de,mousez
        call Num2Dec        
        ld hl,mousez
        ld de,#5073;#50f3;#4033
        ld b,5
simbolz
	ld a,(hl)
        push bc
        push hl
	call showdig
        pop hl
        pop bc
        inc hl
        djnz simbolz
        ret
        
mousex   DEFB 0, 0, 0, 0, 0
mousey   DEFB 0, 0, 0, 0, 0
mousez   DEFB 0, 0, 0, 0, 0

viewnum
        ;ld hl,(num) 
        ld de,mousex
        call Num2Dec        
        ld hl,mousex
        ld de,#4028
        ld b,5
simboln
	ld a,(hl)
        push bc
        push hl
	call showdig
        pop hl
        pop bc
        inc hl
        djnz simboln
        ret

;16-bit Integer to ASCII (decimal)
;Input: HL = number to convert, DE = location of ASCII string
;Output: ASCII string at (DE)
Num2Dec:
        ld      bc,-10000
        call    Num1
        ld      bc,-1000
        call    Num1
        ld      bc,-100
        call    Num1
        ld      c,-10
        call    Num1
        ld      c,b
Num1:
        ld      a,'0'-49
Num2:   inc     a
        add     hl,bc
        jr      c,Num2 ;JMP if c=1
        sbc     hl,bc
        ld      (de),a
        inc     de
        ret
 
