answersLogoWhite

0

; push bytes on to stack

LXI H,start address

MVI C,number of bytes

LOOP1:

MOV A,M

PUSH PSW

DCR C

JNZ LOOP1

; pop bytes in reverse order off of stack

LXI H,start address

MVI C,number of bytes

LOOP2:

POP PSW

MOV M,A

DCR C

JNZ LOOP2

Alternate Answer: (Not using the stack)

LXI B, start address

LXI D, end address

LOOP1:

LDAX B get first byte

MOV H,A save it

LDAX D get last byte

STAX B store in first byte position

MOV A,H retrieve last byte

STAX D store in last byte position

INX B increment first byte address

DCX D decrement last byte address

MOV A,B loop until addresses cross

CMP D

JNC LOOP1

MOV A,C

CMP E

JNC LOOP1

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What stores the data which tells the computer how to load the operating system when it is switched on or rebooted?

A computer boots up by first running a program in Read Only Memory (ROM) that is built into the computer's motherboard. This program is called the Power-On Self Test (POST) and Basic Input/Output System (BIOS). After checking the hardware, the program consults a nonvolatile parameter memory (called "PRAM" or "CMOS" for historical reasons) that acts like Flash memory in that it can be changed but retains its information without power. From this parameter memory, the program in ROM decides where to look for the next step.Typically the next step is to read the first block ("boot block") off of the first hard drive into memory and run the program in it. Other options are to read the first block off the floppy, the CD-ROM, or from the network.In the hard drive situation, the program in the boot block figures out which disk partition is the active partition, loads the boot block from that partition into memory, and runs that program. This allows you to have different operating systems on different partitions and choose which one to run by changing active partitions.The second boot block program loads a more elaborate loader program from the disk, which in turn loads the operating system (finally!).Most PCs have a "BIOS screen" that you can get to by a key sequence (F1 or ESC) during the boot process. This BIOS screen allows you to change the nonvolatile parameter memory; however, it is possible to make changes that will keep your computer from booting, so be careful. For example, bad values in "RAM Timings" will cause serious problems.


What is contiguous memory allocation in os?

Memory allocation: When a program asks for memory and gets it. Contiguous allocation: When the memory is in one big block, for example memory addresses 1000-2000, as opposed to "fragmented allocation" where the memory comes as several smaller blocks in different places, for example memory addresses 1000-1050, 2050-2125, ...


Write a program to store block of data in reverse order in a memory block using 8085 microprocessor?

A possible program to reverse a block of memory using the 8085... PUSH F SAVE PROCESSOR STATE - OPTIONAL PUSH B PUSH D PUSH H LXI H,{address of block} MOV D,H SAVE BLOCK ADDRESS MOV E,H MVI A,{size of block} MOV C,A SAVE BLOCK SIZE LOOP1: MOV A,M GET DATA BYTE PUSH F PUSH ON STACK DCR C DECREMENT LOOP COUNT XRA A TEST FOR END OF LOOP CMP C JNZ LOOP1 MOV H,D RESTORE BLOCK ADDRESS MOV L,E MOVE C,B RESTORE BLOCK SIZE LOOP2: POP F POP FROM STACK MOV M,A PUT DATA BYTE DCR C DECREMENT LOOP COUNT XRA A TEST FOR END OF LOOP CMP C JNZ LOOP2 POP H RESTORE PROCESSOR STATE - OPTIONAL POP D POP B POP F


A lost OR stolen card block can be deleted OR reversed within 24 hours?

Only the service provider can reverse the block they're set on the phone. And they can only do that if the owner of the phone call them and inform that the their phone is back with them.


What are the automatic varriable in c?

An automatic variable is activated and has its memory allocated in the block in which it is declared. The memory and contents will be deleted when the block is exited.


Static variable in c?

A static variable in C is one in which the memory is preallocated before the execution unit begins and lasts for the entire program unit.A non-static variable in C will be allocated in the block in which it is contained, and destroyed outside that block.


How do you unlock memory card of nokia n73?

Memory card passwold


Why does avira antivirus block autorun?

autorun files may contain code that can execute a program on let's say a memory stick which might be a virus! it is just a safety precaution.


Is a fault-block mountain created by reverse faults?

no


When the block to be deallocatedis adjacent to another free block?

In this scenario, the adjacent free block can be merged with the block being deallocated to create a larger free block. This helps reduce fragmentation and improve memory utilization efficiency. The merged block can then be made available for future memory allocation requests.


What is first -fit algorithem in memory allocation?

When seeking a contiguous block of memory to allocate, the first block that is at least as large as the size being requested is allocated.


Is cache a block of high speed memory?

Yes ,i think cache memory is very fast memory in conputer system.