The program is compiled in Keil for 8051 - AT89C51 in assembly language. Program to find square root of a number, Flowchart:- Program:- ORG 0000H MOV R0,#40H MOV R1,#01H MOV R2,#00H MOV A,@R0 LOOP: SUBB A,R1 INC R2 JZ ANSWER JC FALSE INC R1 INC R1 SJMP LOOP FALSE: MOV 50H, #0FFH SJMP $ ANSWER: MOV 50H,R2 SJMP $ END Output:- For more ASM programs - click here
How to Write an Assembly Program to Display a Scrolling Message on an LCD Introduction In this blog post, we will explore how to write an assembly program to display a scrolling message on an LCD. This guide will walk you through the logical steps, provide the complete assembly code, and show the output on an LCD screen. Whether you are a beginner or an experienced programmer, this tutorial will help you understand the basics of interfacing an LCD with a microcontroller and creating a scrolling text effect. Logical Steps Initialize the LCD: Set up the data direction registers. Configure the LCD in 4-bit or 8-bit mode. Send initialization commands to the LCD. ...