Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
C/Assembly
int main() { __asm__ ( // print Hello World "movl $1, %eax;\n" /* 1 is the syscall number for write */ "movl $1, %ebx;\n" /* 1 is stdout and is the first argument */ // "movl $message, %esi;\n" /* load the address of string into the second argument*/ // instead use this to load the address of the string // as 16 bytes from the current instruction "leal 16(%eip), %esi;\n" "movl $13, %edx;\n" /* third argument is the length of the string to print*/ "syscall;\n" // call exit (so it doesn't try to run the string Hello World // maybe I could have just used ret instead "movl $60,%eax;\n" "xorl %ebx,%ebx; \n" "syscall;\n" // Store the Hello World inside the main function "message: .ascii \"Hello World!\\n\";" ); }
run
|
edit
|
history
|
help
0
funciones serie de taylor
left significant peace as unison real manual user
BSEARCH() COMPLETE
finalpyramid
CO Assignment 1 Question 4
A_141117_Primo01
ㅇㅇㅇ
16-bit signed or unsigned int -> ASCII
project 5 v.075
test