File: msgdemo.asm

package info (click to toggle)
fasm 1.73.32-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,540 kB
  • sloc: pascal: 4,300; asm: 3,056; makefile: 12
file content (27 lines) | stat: -rw-r--r-- 404 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

; fasm demonstration of assembling object files

; compile the program using commands like:
;   fasm msgdemo.asm msgdemo.o
;   fasm writemsg.asm writemsg.o
;   ld msgdemo.o writemsg.o -o msgdemo

format ELF

section '.text' executable

 public _start
 _start:

 extrn writemsg

	mov	esi,msg
	call	writemsg

	mov	eax,1
	xor	ebx,ebx
	int	0x80

section '.data' writeable

 msg db "Elves are coming!",0xA,0