



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




= directive:
AND: used for masking (updates zero and parity flag and the current register value(al) ) Test: same as AND command but doesn’t update current register value (al) XOR: used to check parity of a number if a register is XOR with 0 is tells the parity of that number if we XOR two number together it will tell the parity of both numbers combined. Rotate carry then check edge cases by rotating on ax then on al then see how it updates PUSH POP: PUSH A: pushes 16 bit registers to stack (order: ax cx dx bx sp bp si di) POP A: pops all 16 bit register in back to the register. PUSH AD: pushes 32 bit register to stack POP AD: pops 32 bits register to original registers PUSHF: pushes 16 bit flag register to stack PUSHFD: pushes 32 bit flag register to stack Ret --> pops ret address then moves to program Ret 4 --> pops ret address and also pops 4 bytes of memory from stack SHIFTS and Registers: SHL: multiplies by 2 and simply shifts to left side and for only that specific register no affect in its vicinity like shl al,10 will have no shifting from al to ah even the shift size increases. (has affect on carry flag) but carry bit doesn’t move into registers same for shr
Cdq: convert double to quad then eax:edx CACHE: C --> cache size B -->no of block b --> block size C = b* B S --> sets S = B/N ; N = associativity level direct mapping 1, associativity 2 Offset bits = log 2 (b) = number of offset bits Set bits/line bits = log 2 (S) = number of set bits Tag bits = total address bits - offset bits - set bits
1. Without IRVINE CODE . .model flat, stdcall .stack 4096 ; WINAPI declaration GetStdHandle PROTO, a2:dword WriteConsoleA PROTO, a1:dword, a2: ptr byte, a3:dword, a4:ptr dword, a5:dword ReadConsoleA PROTO, a1:dword, a2: ptr byte, a3:dword, a4:ptr dword, a5:dword .data ; declarations here .code ; functions here Main PROC ; main code here Main ENDP
;functions here END main
2. Irvine CODE include irvine32.inc .data msg db "Lab section c 09" readmsg db 255 dup(?) .code main proc mov edx,offset msg call writestring call crlf mov edx,offset readmsg mov ecx, ;call readstring call readint call writeint main endp end main
Total steps to set up an Empty C++ Project to a COAL project