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:
“Histories are more full of examples of the fidelity of dogs than of friends.”
—Alexander Pope (16881744)
“In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.”
—Michel de Montaigne (15331592)
“Short of a wholesale reform of college athleticsa complete breakdown of the whole system that is now focused on money and powerthe womens programs are just as doomed as the mens are to move further and further away from the academic mission of their colleges.... We have to decide if thats the kind of success for womens sports that we want.”
—Christine H. B. Grant, U.S. university athletic director. As quoted in the Chronicle of Higher Education, p. A42 (May 12, 1993)
“I love meetings with suits. I live for meetings with suits. I love them because I know they had a really boring week and I walk in there with my orange velvet leggings and drop popcorn in my cleavage and then fish it out and eat it. I like that. I know Im entertaining them and I know that they know. Obviously, the best meetings are with suits that are intelligent, because then things are operating on a whole other level.”
—Madonna [Madonna Louise Ciccione] (b. 1959)
“Before anything else, we need a new age of Enlightenment. Our present political systems must relinquish their claims on truth, justice and freedom and have to replace them with the search for truth, justice, freedom and reason.”
—Friedrich Dürrenmatt (19211990)