School Commit Init
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#include<stdio.h>
|
||||
void subprogram(int* p,int a);
|
||||
int main(){
|
||||
int a=0x12345678;
|
||||
int p[8];
|
||||
subprogram(p,a);
|
||||
for (int i=7;i>=0;i--){
|
||||
printf("%x ",p[i]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
bits 32
|
||||
global _subprogram
|
||||
|
||||
segment code use32 class=code public
|
||||
_subprogram:
|
||||
mov ECX,8
|
||||
mov EBX,[ESP+4]
|
||||
mov EAX,[ESP+8]
|
||||
.label:
|
||||
mov [EBX+ECX*4-4],EAX
|
||||
rol EAX,4
|
||||
loop .label
|
||||
ret
|
||||
Reference in New Issue
Block a user