Apply Nindent to all .c and .h files
[nasm/avx512.git] / test / multisection.asm
blob0da2fc7439b62d542d85c8dab636fcafd36556db
1 ; To test where code that is placed before any explicit SECTION
2 ; gets placed, and what happens if a .text section has an ORG
3 ;statement, uncomment the following lines.
5 ; times 10h nop
7 ;section .text
8 ;org 0x300
9 ; times 20h inc ax
11 ; let's see which of these sections can be placed in the specified order.
13 section .appspecific
14 section .data
15 section .stringdata
16 section .mytext
17 section .code
18 section .extra_code
21 section .stringdata
22 mystr1: db "Hello, this is string 1", 13, 10, '$'
24 section .extra_code
25 org 0x200
26 bits 16
27 more:
28 mov si, asciz1
29 mov ah, 0x0E
30 xor bx, bx
31 .print:
32 lodsb
33 test al, al
34 jz .end
35 int 0x10
36 jmp short .print
37 .end:
39 xor ax, ax
40 int 0x16
42 mov ax, 0x4c00
43 int 0x21
45 section .appspecific
46 asciz1: db "This is string 2", 0
48 section .code
49 org 0x100
50 bits 16
52 start:
53 mov dx, mystr1
54 mov ah, 9
55 int 0x21
57 xor ax, ax
58 int 0x16
60 jmp more
62 section .text
63 xor eax,eax
64 times 50h nop
66 section .mytext
68 xor ebx,ebx
70 section .data
71 db 95h,95h,95h,95h,95h,95h,95h,95h
73 section .hmm
74 resd 2
76 section .bss
77 resd 8
79 section .final1
80 inc ax
82 section .final2
83 inc bx
85 section .final3
86 inc cx