-
Notifications
You must be signed in to change notification settings - Fork 7
/
libHexadecimalCommand.asm
29 lines (26 loc) · 1.06 KB
/
libHexadecimalCommand.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;*******************************************************************************
;* Hexadecimal Convertor Operation *
;*******************************************************************************
;* Syntax : $ (addr)
;*******************************************************************************
;** hex conv. -- syntax :- $ (addr) **
COM_HEXDEC
jsr IBYTE2 ; Get Word Value
sta HT + 1 ; Store Value
stx HT
jsr PrintCarrageReturnAndLineFeed
jsr DECPR ; Print Decimal Conversion
jsr PrintCarrageReturnAndLineFeed
jsr BINPR ; Print Binanry Conversion
jsr PrintCarrageReturnAndLineFeed
jsr OCTPR ; Print Octal Conversion
jmp READY ; Back To Command Line
;*******************************************************************************
HEXPR
jsr Print_Dollar ; Prints Dollar Sign
lda #CHR_Equals
jsr krljmp_CHROUT$ ; Prints Equals Sign
jsr SPACE
lda HT
ldx HT + 1
jmp PBYTE2 ; Print Hex Word Value