VTech Alphabert s Magic Readport User Manual Page 51

  • Download
  • Add to my manuals
  • Print
  • Page
    / 80
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 50
BM Dept., Govt. Engg. College, Gandhinagar Page 51
MOV A,37H ;Convert the number stored at 37h into ASCII
ACALL HEXASCI
ACALL DISP_DATA ; Display ASCII code of number at LCD
MOV A,36H
ACALL HEXASCI
ACALL DISP_DATA
MOV A,35H
ACALL HEXASCI
ACALL DISP_DATA
MOV A,34H
ACALL HEXASCI
ACALL DISP_DATA
MOV A,33H
ACALL HEXASCI
ACALL DISP_DATA
AJMP LOOP
HEXASCI:
ADD A,#36H
JNB PSW.6,SKIP
ADD A,#07H
SKIP: SUBB A,#06H
RET
HEXBCD:
MOV 35h,#0
MOV 36h,#0
MOV 37h,#0
MOV A,30h
MOV B,#10
DIV AB
MOV 33h,B
MOV 34h,A
MOV A,31h
JZ GO_NEXT
MOV B,#10
DIV AB
MOV 35h,B
MOV 36h,A
; Value in 35h is 256 times higher than value standing in 33h, 34h. Mply 35h with 6,
; add to 33h, mply 35h with 5, add to 34h, mply 35h with 2 and replace itself in 35h
MOV R0,#35h ; Point to 35h
ACALL TRANSF ; Transform 35h to 3 lower position
INC R0 ; Repeat from 36h, now all registers are 1 higher
ACALL TRANSF ; Transform 36h to 3 higher positions
GO_NEXT:
MOV R0,#33h ; Point to lowest digit i.e. first digit
ACALL DECADJ
RET
TRANSF:
Page view 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 79 80

Comments to this Manuals

No comments