home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tiger Disk 13
/
Tiger_Disk_013_19xx_Tiger-Crew-Disk_de_Side_A.d64
/
hexdec.seq
< prev
next >
Wrap
Text File
|
2023-02-26
|
1KB
|
60 lines
*= $1000
;***************************************
;* hexdec-routine (w) 1994 by madrom *
;***************************************
;* routine wird mit - jsr hexdec - *
;* aufgerufen. in x- und y-reg zeigen *
;* auf die 16bit hexzahl, die sich im *
;* speicher im ascii-format befinden *
;* muss. nach dem aufruf steht in x-reg*
;* und akku die in dezimale format *
;* umgewandelte zahl ... mdr/t-c/crm *
;***************************************
hexdec
lda #4
sta 251
stx 252
sty 253
ldy #0
hd1
lda (252),y
cmp #$41
bcs hd3
sec
sbc #48
jmp hd2
hd3
sec
sbc #55
hd2
sta hd4,y
iny
cpy 251
bne hd1
lda hd4
asl a
asl a
asl a
asl a
clc
adc hd4+1
sta 254
lda hd4+2
asl a
asl a
asl a
asl a
adc hd4+3
sta 255
ldx 255
lda 254
rts
hd4
.text "0000"