100% found this document useful (1 vote)
266 views

Assembly Code Example

library system
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
100% found this document useful (1 vote)
266 views

Assembly Code Example

library system
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
Ex_1: Using emu8086 program, write a program in Assembly language that performs the following tasks, showing the contents of the affected registers, mémory locations and fags: 2. Initialize AX and SI registers with the Immediate value 1520H and 0300H respectively. b, Save the immediate value 3040H at the data segment memory location addressed by SI. c. Add the word contents at the data segment memory location addressed by Si to AX with the sum stored at the AX register. oem ements emuaer ob ashcods hp oe. 8.8 + 6 o|t ¢ = ee ea eee org EX mT mov ax. 1520h mov si, 6300h ib mov dsifsil, 3040h BaMTREH=SSSIAR add ax,[si] Ex, Using emu8086 program, write a program in Assembly language that performs the following tasks, showing the contents of the affected registers, memory locations and flags: 2 Initialize AX and DX registers with the immediate values 1234h and 5678H respectively b, Subtract the word content of AX register from the word content of DX res the difference stored In the DX register. mov de, 5 sub dx, ax! Ex. Using emu8086 program, write @ program in Assembly language that performs the following tasks, showing the contents ofthe affected registers, memory locations and flags’ 2. {Initialize AL, BL,CL and DI. registers with the Immediate data 10h, 20h, 30h, and 40h respectively. a b. SWAP between the contents of AX and BX registers. 4. Copy the content of AX register into the data segment memory location addressed by 0200H then Copy the contents of BX and CX registers at the consecutive offset addresses. ©. Copy the cobtent of DX register into the stack segment memory location addressed by 0100h then Copy the Immediate data 4433H and 2211H at the consecutive offset addresses. fle eft bookmerts exrembler emistot_ math exicoves hep os & . G2.) # + &@ @)|2 @ w@ ‘open _ecamrles "sve" comple emule _caledstr convertor options help about i? O7 mov al, T 68 mov bl} 20h 09 mov cl; 1@ mov dl, 40h 1) 12 13 ib 14 is mov cx, ax = 16 mov ax, bx 17 mov bx, oxi 18 13 ic 22 21 B B = >| So e/2 * Sisto erates | esteniter com [orient babe £9200h1, ax @200h+"2h], bx mov [@200h+ 4h Ex_4: Using emu8086 program, write a program in Assembly language that performs the following tasks, ‘showing the contents of the affected registers, memory locations and flags: ‘a Copy the string data "NO" into AX register. Initialize the source index register (SI) with the initial value 0200H and the base pointer register (BP) with initial value 0100H then copy the contents of AX register into the stack segment memory locations addressed by SHBP+20H. b. Initialize the destination index register (DI) with initial value 0300h then copy the string data "HELLO" into the extra data segment memory locations addressed by DI+100H. bookmenks esenbler emulator muth eschcodes help os ¢ 8 .| # > | & @/|R ¢ open mamples 7 ze 7 compile _emulite _escustor convertor options help mov 3i; @2B0H nov bp, Q13¢h Rov seilsisbp+20h], ax I pb s2sssssss25 "EH" 5 "OLLEH" +104h], “O° 1

You might also like