BM Dept., Govt. Engg. College, Gandhinagar Page 19
JC next ;If A<next data then check next data
MOV 60h,R0 ;Save smallest location at RAM address 60h
MOV b,@R0 ;If A>next data then transfer next data to accumulator
next: CJNE R0,#4Fh,start ;Check for last location
MOV R0,60h ;Get smallest location again
MOV a,@R0 ;Exchange first data with location of smallest no.
XCH A,@R1
MOV @R0,A
INC R1
MOV A,R1 ;Start search for small number from next location
MOV R0,A
CJNE R1,#4Fh,loop ;Check for last location
END
:: WORKSHEET ::
Exercise:
A. Write an assembly language program to transfer data from external memory locations
5000h-500Fh to the internal memory locations 30-3Fh.
Memory
Location
HEX
code
Label Opcode Operands Comments
Comments to this Manuals