File: testlib.asm

package info (click to toggle)
yasm 1.3.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,880 kB
  • sloc: asm: 74,423; ansic: 53,055; python: 9,927; sh: 5,276; xml: 1,617; makefile: 214; pascal: 95; sed: 16
file content (18 lines) | stat: -rw-r--r-- 343 bytes parent folder | download | duplicates (28)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; program to test retrieval of and linkage to modules in libraries by
; ldrdf

[SECTION .text]
[GLOBAL _main]
[EXTERN _strcmp]

_main:
	push dword string1
	push dword string2
	call _strcmp
	add esp,8		; doh! clear up stack ;-)
	ret

[SECTION .data]

string1:	db 'abc',0	; try changing these strings and see
string2:	db 'abd',0	; what happens!