I'm trying to understand some example asm that came with a development board (XL400), with a view to converting it to C.
The asm code is included below, unfortunately the documentation, such as it is, is translated very badly from Chinese, which makes it worse than useless. Also its a long time since I've used asm!
In the code there is a JB instruction in the DELAY subroutine (third last line of code). I cannot understand what it does or how it is supposed to operate. Googling JB results in explanation for a different form (JB label) so Im not sure if the asm is right even?? Help much appreciated, Ta
RS EQU P2.0
RW EQU P2.1
E EQU P2.2
ORG 0080H
MOV P0,#00000001B ;- Screen
ACALL ENABLE
MOV P0,#00000001B ;- Screen
ACALL ENABLE
MOV P0,#00111000B ;Display
ACALL ENABLE
MOV P0,#00001111B ;Show switch control
ACALL ENABLE
MOV P0,#00000110B ;Input mode
ACALL ENABLE
MOV P0,#0C0H ;Data memory address
ACALL ENABLE
mov p0,#01000001b ;ASCII code
SETB RS
CLR RW
CLR E
ACALL DELAY
SETB E
AJMP $
ENABLE: CLR RS ;Send orders
CLR RW
CLR E
ACALL DELAY
SETB E
RET
DELAY: MOV P0,#0FFH
CLR RS
SETB RW
CLR E
NOP
SETB E
JB P0.7,DELAY ;Judgement busy signs
RET
END