Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8863495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:59:33+00:00 2026-06-14T15:59:33+00:00

I’m trying to understand some example asm that came with a development board (XL400),

  • 0

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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:59:35+00:00Added an answer on June 14, 2026 at 3:59 pm

    The JB instruction in 8051 assembler jumps to the address indicated by the label in the second operand if the bit specified by the first operand is set. So in your case it will jump to MOV P0,#0FFH if P0.7 is set.

    The JB label instruction you are referring to is an 8086 instruction (jump below based on the result of the CMP instruction just before) so you were looking on the wrong page.

    EDIT: I don’t know exactly what type of LCD they’re using but I think it’s the busy flag – as these displays are all rather closely related to the venerable Hitachi 44780. In the board’s schematic P0.7 is connected to display pin 14, which commonly is DB7, and that’s where the busy flag lives. Of course it’s always best to use the documentation of the actual display, but this one is probably pretty close and could get you started. Also, that display is so popular that it’s very easy to find code in all possible languages on howto program it. Might be easier to follow that route than to reverse engineer the assembly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.