User:HiyaHiya/Codebox: Difference between revisions
Appearance
No edit summary |
Guest-1052 (talk | contribs) No edit summary |
||
| Line 65: | Line 65: | ||
return 0; | return 0; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 77: | Line 76: | ||
<a href="https://owot.me">owot.me</a> | <a href="https://owot.me">owot.me</a> | ||
</syntaxhighlight> | |||
== assembly == | |||
<syntaxhighlight lang="asm"> | |||
section .data | |||
hello: db "Hello, World!",10 ; declare the hello world variable | |||
strlength: equ $-hello ; declare the length of the hello world variable and stick it in a other variable | |||
section .text | |||
global _start | |||
_start: | |||
mov eax,4 | |||
mov ebx,1 ; blah blah blah, you already know what this is | |||
mov ecx,hello | |||
mov edx,strlength ; this just puts the string in the console | |||
int 80h | |||
mov eax,1 ; the end of the program | |||
mov ebx,0 | |||
int 80h | |||
</syntaxhighlight> | </syntaxhighlight> | ||