annotate nasmbuild/nasm-2.13rc9/test/multisection.asm @ 10714:0350bdce1ab8

<rdococ> revert
author HackBot
date Sun, 16 Apr 2017 15:59:43 +0000
parents 587a0a262d22
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10554
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
1 ;Testname=aout; Arguments=-faout -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
2 ;Testname=aoutb; Arguments=-faoutb -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
3 ;Testname=as86; Arguments=-fas86 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
4 ;Testname=elf32; Arguments=-felf32 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
5 ;Testname=elf64; Arguments=-felf64 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
6 ;Testname=obj; Arguments=-fobj -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
7 ;Testname=rdf; Arguments=-frdf -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
8 ;Testname=win32; Arguments=-fwin32 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
9 ;Testname=win64; Arguments=-fwin64 -olnxhello.o -Ox; Files=stdout stderr lnxhello.o
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
10
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
11 ; To test where code that is placed before any explicit SECTION
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
12 ; gets placed, and what happens if a .text section has an ORG
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
13 ;statement, uncomment the following lines.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
14 ;
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
15 ; times 10h nop
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
16 ;
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
17 ;section .text
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
18 ;org 0x300
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
19 ; times 20h inc ax
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
20
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
21 ; let's see which of these sections can be placed in the specified order.
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
22
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
23 section .appspecific
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
24 section .data
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
25 section .stringdata
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
26 section .mytext
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
27 section .code
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
28 section .extra_code
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
29
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
30
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
31 section .stringdata
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
32 mystr1: db "Hello, this is string 1", 13, 10, '$'
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
33
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
34 section .extra_code
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
35 org 0x200
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
36 bits 16
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
37 more:
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
38 mov si, asciz1
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
39 mov ah, 0x0E
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
40 xor bx, bx
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
41 .print:
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
42 lodsb
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
43 test al, al
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
44 jz .end
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
45 int 0x10
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
46 jmp short .print
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
47 .end:
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
48
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
49 xor ax, ax
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
50 int 0x16
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
51
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
52 mov ax, 0x4c00
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
53 int 0x21
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
54
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
55 section .appspecific
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
56 asciz1: db "This is string 2", 0
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
57
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
58 section .code
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
59 org 0x100
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
60 bits 16
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
61
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
62 start:
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
63 mov dx, mystr1
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
64 mov ah, 9
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
65 int 0x21
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
66
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
67 xor ax, ax
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
68 int 0x16
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
69
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
70 jmp more
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
71
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
72 section .text
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
73 xor eax,eax
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
74 times 50h nop
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
75
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
76 section .mytext
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
77
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
78 xor ebx,ebx
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
79
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
80 section .data
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
81 db 95h,95h,95h,95h,95h,95h,95h,95h
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
82
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
83 section .hmm
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
84 resd 2
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
85
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
86 section .bss
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
87 resd 8
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
88
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
89 section .final1
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
90 inc ax
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
91
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
92 section .final2
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
93 inc bx
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
94
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
95 section .final3
587a0a262d22 <moonythedwarf> ` cd nasmbuild; tar -xf nasm.tar.gz
HackBot
parents:
diff changeset
96 inc cx