"Fossies" - the Fresh Open Source Software Archive 
Member "fasm/tools/libc/symbols.asm" (21 Feb 2022, 1437 Bytes) of package /linux/misc/fasm-1.73.30.tgz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Generic Assembler source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1
2 format ELF
3 public main
4
5 include 'ccall.inc'
6
7 section '.text' executable align 16
8
9 main:
10 mov ecx,[esp+4]
11 mov [argc],ecx
12 mov ebx,[esp+8]
13 mov [argv],ebx
14
15 mov [display_handle],1
16
17 call get_params
18 jnc make_dump
19
20 mov esi,_usage
21 call display_string
22 ccall exit,2
23
24 make_dump:
25 call symbols
26 ccall exit,0
27
28 error:
29 mov [display_handle],2
30 mov esi,_error_prefix
31 call display_string
32 pop esi
33 call display_string
34 mov esi,_error_suffix
35 call display_string
36 ccall exit,0
37
38 get_params:
39 mov ecx,[argc]
40 mov ebx,[argv]
41 add ebx,4
42 dec ecx
43 jz bad_params
44 get_param:
45 mov esi,[ebx]
46 mov al,[esi]
47 cmp [input_file],0
48 jne get_output_file
49 mov [input_file],esi
50 jmp next_param
51 get_output_file:
52 cmp [output_file],0
53 jne bad_params
54 mov [output_file],esi
55 jmp next_param
56 bad_params:
57 stc
58 ret
59 next_param:
60 add ebx,4
61 dec ecx
62 jnz get_param
63 cmp [input_file],0
64 je bad_params
65 cmp [output_file],0
66 je bad_params
67 clc
68 ret
69
70 include 'system.inc'
71
72 include '..\symbols.inc'
73
74 section '.data' writeable align 4
75
76 input_file dd 0
77 output_file dd 0
78
79 _usage db 'symbols dumper for flat assembler',0Dh,0Ah
80 db 'usage: symbols <input> <output>',0Dh,0Ah
81 db 0
82 _error_prefix db 'error: ',0
83 _error_suffix db '.',0Dh,0Ah,0
84
85 section '.bss' writeable align 4
86
87 input dd ?
88 output_buffer dd ?
89 output_handle dd ?
90
91 argc dd ?
92 argv dd ?
93
94 display_handle dd ?
95 character db ?
96
97 params rb 1000h
98 buffer rb 1000h