/* If you want the symbol table saved as a file include the statement "export_sym" followed by a file-name and, optionally, a numeric parameter which defines the format of the file. (Changed for v1.7 of Zeus) Examples: export_sym "c:\fred.sym" This would output an alphanumerically sorted symbol file where each line is in the format "fred EQU $1234". export_sym "c:\fred.sym",0 This would do exactly the same. The numeric option 0 means sorted, equ included and hex. The separate options are bit-fields in the option number, so it would be sensible to use binary when specifying them: Bits 1,0 determine the format 00 -> fred EQU $002A 01 -> fred $002A 10 -> fred EQU 42 11 -> fred 42 Bit 2 adds integer variables Bit 3 adds floating point variables Bit 4 adds string variables Bit 5 adds locals Bit 6 adds segment definitions Bit 7 disables labels Bit 8 disables alpha-sorting, instead they're in order of symbol definition Bit 9 enables Diana format export - this creates a symbol table that can be copied directly into Diana. Bit 10 does something I'm not documenting... because I don't remember ;) Examples of the possible options are: export_sym "fred.sym",%1 000000 00 would output an unsorted list in the form "fred EQU $1234" and so on... export_sym "fred.sym",%0 001000 00 Would output an sorted list in the form "fred EQU $1234" that also includes local labels. export_sym "fred.sym",%0 010000 00 Would output an sorted list in the form "fred EQU $1234" that also includes segment definitions. export_sym "fred.sym",%0 011111 00 Would output an sorted list in the form "fred EQU $1234" that also included every type of symbol. There is also support for a symbol table that can be imported into a Diana format definition file. Note that this removes all but the first symbols that have the same value - Diana would complain if it didn't. export_sym "",%1 0 000000 00 ; Create in Diana format */ ; This defines most kinds of labels segment code = $0000,$10000 AnInteger = 42 AFloat = 42.5 AString = "Forty-Two!" EquInteger equ 42 EquFloat equ 42.5 EquString equ "Forty-Two!" org 42 Local proc ALocalLabel nop ALocalInteger = 42 ALocalFloat = 42.5 ALocalString = "Forty-Two!" retp ; Now, uncomment the line you want to try, assemble, and look at the Symbols... ; export_sym "",%0 0 000000 00 ; Normal, alpha sorted ; export_sym "",%0 1 000000 00 ; Normal, sorted in order of defn ; export_sym "",%0 0 100001 00 ; Show only integers ; export_sym "",%0 0 100010 00 ; Show only floats ; export_sym "",%0 0 100100 00 ; Show only strings ; export_sym "",%0 0 001000 00 ; Include locals ; export_sym "",%0 0 110000 00 ; Show only segments export_sym "",%0 0 011111 00 ; Show everything ; export_sym "",%1 0 000000 00 ; Create in Diana format