Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ProvaAssembly.cpp: definisce il punto di ingresso dell'applicazione console.
- //
- #include "stdafx.h"
- #include "stdlib.h"
- int main()
- {
- unsigned short int Mat = 9270; // INSERIRE QUI LE 4 CIFRE MENO SIGNIFICATIVE DELLA
- unsigned char Vet[100]; // Vettore di 100 BYTE
- unsigned short Ris1, Ris2, Ris3, Ris4, Ris5; // WORD
- __asm {
- XOR ECX,ECX
- MOV CX,Mat
- MOV AX,CX
- AND CX, 0007h
- ADD CX,8
- SUB DX,DX
- DEC DX
- L1: XOR AX,DX
- LOOP L1
- INC AX
- MOV Ris1,AX
- ////-----------------
- MOV AX,Mat
- AND AL,AH
- AND AL,0100b
- JNZ L2
- INC AL
- JMP L3
- L2: SUB AL,-7
- L3: MOV Ris2,AX
- ////--------
- MOV AX, Mat
- LEA ESI, Vet
- MOV[ESI + 10], AX
- SHL AX, 4
- MOV[ESI + 12], AX
- MOV ECX, 4
- L4: MOV AH, [ESI + ECX + 9]
- MOV[ESI + ECX + 20], AH
- LOOP L4
- MOV AH, [ESI + 24]
- XOR AL, AL
- MOV Ris3, AX
- //--------------------
- MOV AX, Mat
- AND AX, 00FFh
- OR AX, 0100h
- MOV BL, 7
- DIV BL
- MOV Ris4, AX
- //-------------
- MOV AX, Mat
- MOV BL, -2
- AND BL, 6Fh
- XOR BL, 0F6h
- SHR AX, 4
- OR AL, 7
- AND AX, 007Fh
- MOV BL, -3
- IMUL BL
- MOV Ris5, AX
- //---------
- }
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement