Examples of Programs For Various Operating Systems
This is a Hello world program for the DOS operating system.
section .text org 0x100 mov ah, 0x9 mov dx, hello int 0x21 mov ax, 0x4c00 int 0x21 section .data hello: db 'Hello, world!', 13, 10, '$'An example of a similar program for Microsoft Windows:
global _start extern _MessageBoxA@16 extern _ExitProcess@4 section code use32 class=code _start: push dword 0 ; UINT uType = MB_OK push dword title ; LPCSTR lpCaption push dword banner ; LPCSTR lpText push dword 0 ; HWND hWnd = NULL call _MessageBoxA@16 push dword 0 ; UINT uExitCode call _ExitProcess@4 section data use32 class=data banner: db 'Hello, world!', 0 title: db 'Hello', 0An equivalent program for Linux:
section .data msg: db "Hello, world!", 10 .len: equ $ - msg section .text global _start _start: mov eax, 4 ; write mov ebx, 1 ; stdout mov ecx, msg mov edx, msg.len int 0x80 mov eax, 1 ; exit mov ebx, 0 int 0x80Read more about this topic: Netwide Assembler
Famous quotes containing the words examples of, examples, programs, operating and/or systems:
“There are many examples of women that have excelled in learning, and even in war, but this is no reason we should bring em all up to Latin and Greek or else military discipline, instead of needle-work and housewifry.”
—Bernard Mandeville (16701733)
“There are many examples of women that have excelled in learning, and even in war, but this is no reason we should bring em all up to Latin and Greek or else military discipline, instead of needle-work and housewifry.”
—Bernard Mandeville (16701733)
“[The Republicans] offer ... a detailed agenda for national renewal.... [On] reducing illegitimacy ... the state will use ... funds for programs to reduce out-of-wedlock pregnancies, to promote adoption, to establish and operate childrens group homes, to establish and operate residential group homes for unwed mothers, or for any purpose the state deems appropriate. None of the taxpayer funds may be used for abortion services or abortion counseling.”
—Newt Gingrich (b. 1943)
“Many people operate under the assumption that since parenting is a natural adult function, we should instinctively know how to do itand do it well. The truth is, effective parenting requires study and practice like any other skilled profession. Who would even consider turning an untrained surgeon loose in an operating room? Yet we operate on our children every day.”
—Louise Hart (20th century)
“I am beginning to suspect all elaborate and special systems of education. They seem to me to be built up on the supposition that every child is a kind of idiot who must be taught to think.”
—Anne Sullivan (18661936)