-
First define the segment registers used, such as ds, es (can be without) must define ** segment for example: code:segmentassume:cs:code
start: The program to be written.
code ends
end start
-
org 0030h
start: setb
here: mov p0,#3fh
mov p2,#3fh
mov r0,#00h
mov r1,#00h
mov dptr,#tab
l1: jb ,$
jnb ,$
inc r0
mov a,r0
movc a,@a dptr
mov p2,a
cjne r0,#0ah,l1
l2: inc r1
cjne r1,#0ah,here ;Remove this one.
mov r0,#00h
mov p2,#3fh ;Add this article.
mov a,r1
movc a,@a dptr
mov p0,a
cjne r1,#0ah,l1 ;Add this article.
ajmp here
tab: db 3fh,06h,5bh,4fh,66h,6dh,7dh,07h,7fh,6fh
endbtw:
It is generally better to write this at the beginning of the program.
org 00h
ajmp start
org 30h
-
segment
db/dwends
assume
These are pseudo-directives, see the relevant information for their purpose and usage. Then you can understand!
-
Write a program, to segment it.
Data Segment This is a segment ......Data Ends Stack Segment This is another segment ......stack ends code segment This is another segment .........
Write out a few.
Ten or hundreds of segments are fine.
However, when working on a computer, currently, only four segments can be used.
Other segments, idle.
assume cs:code,ds:data,ss:stack,es:data specifies the current segment.
-
int0:0003h
t0: 000bh
int1:0013h
t1: 001bh
Serial port: 0023h
Generally, a jump command ljmp is written at the corresponding interrupt entry location, and a return instruction reti is written at the end of the interrupt service program
-
1) What does the $- in $string mean?
A: The $-string represents a continuous storage unit in memory, and $ represents a fixed prefix!
2)dw ?Medium'?'What does that mean?
Answer: DW is used to define words, here? It is used to reserve storage space and does not store any data.
Dear, remember to adopt it.
-
1) $ represents the current sweatshirt, as in your example, as follows:
dseg segment
string db 'xx..'
length equ $-string
key_addr dw ?
dseg ends
where length=2-0=2, that is, the current offset $ is 2, and the offset of string is 0
2)dw ?Medium'?'Indicates the allocation of 1 word unit (2 bytes) of memory space, the content of the word unit is not initialized, and its value is random, that is, it is not a definite value.
-
This is because identifiers such as variable names and statement numbers are required to start with a letter.
If you don't add 0, you write abh, and no one can figure out whether this is the hexadecimal number abh or the name of a variable called abh.
-
We know that hexadecimal data greater than 9fffh a000h, a001h...fffeh, ffffh, etc., all start with a letter when they are written. In assemblers, data can't start with a letter, so 0 should be added in front.
For example, 9138h can be written as "9138h" in the assembly source program, while a000h can be written as "0a000h" in the assembly source program.
-
Happiness is something that doesn't have to be talked about often, and when I wake up in the morning, my eyes are full of hope, and I know that happiness is by my side, and I have never left.
-
When I'm sailing against the current, you are with me, I don't want anything else, happiness, it's simple!
You're at ease!
-
Happiness is luck and blessing. Happiness is your choice! - Let's work together for happiness!
-
This seems to be difficult, happiness can only be truly understood by experiencing it yourself! Sometimes a small thing is happiness! The key is to see how you understand it!
-
[Seven Uniques] "Happiness".
The blood-stained red flag hammer and sickle, the liberation of the whole people saw the blue sky.
The people of the Zedong route are blessed, and the red sun rises in the east for thousands of years.
-
Try to write your feelings in the most peaceful, beautiful or plain, and simple language.
There is a 3:2 option in the size setting of the digital album, and if you choose this, you can have the same ratio as 5 inches and 6 inches. >>>More
Take a cold shower, which should be different from person to person, do not wash indiscriminately.
It depends on your design system to decide which type to choose, so I will briefly explain the following balancing valves below, and then give you how to choose! >>>More
It depends on what you do.
Generally, there are C S architecture and B S architecture. >>>More
The process waste left between the punching parts and between the punching parts and the side of the strip during nesting is called lapping. The function of lap is to compensate for positioning errors and shearing errors to ensure that qualified parts are punched out; the second is to increase the stiffness of strips, facilitate the feeding of strips, and improve labor productivity; At the same time, the lap can also avoid the burr on the edge of the strip during punching, and the gap between the molds can be improved, so as to improve the life of the mold. The lap value has a great impact on the hedging process and the quality of the punching part, so it is necessary to reasonably determine the lap value. >>>More