comparison docs/manual/manual.html @ 478:a71206ed966c lwtools-4.16

Update manual in preparation for release
author William Astle <lost@l-w.ca>
date Wed, 12 Dec 2018 20:00:59 -0700
parents cad5937314cb
children 52af0aa54fe5
comparison
equal deleted inserted replaced
477:221b8964662a 478:a71206ed966c
198 HREF="#CONVINST" 198 HREF="#CONVINST"
199 >Convenience Instructions</A 199 >Convenience Instructions</A
200 ></DT 200 ></DT
201 ><DT 201 ><DT
202 >3.12. <A 202 >3.12. <A
203 HREF="#AEN805" 203 HREF="#AEN810"
204 >Cycle Counts</A 204 >Cycle Counts</A
205 ></DT 205 ></DT
206 ></DL 206 ></DL
207 ></DD 207 ></DD
208 ><DT 208 ><DT
209 >4. <A 209 >4. <A
210 HREF="#AEN811" 210 HREF="#AEN816"
211 >LWLINK</A 211 >LWLINK</A
212 ></DT 212 ></DT
213 ><DD 213 ><DD
214 ><DL 214 ><DL
215 ><DT 215 ><DT
216 >4.1. <A 216 >4.1. <A
217 HREF="#AEN814" 217 HREF="#AEN819"
218 >Command Line Options</A 218 >Command Line Options</A
219 ></DT 219 ></DT
220 ><DT 220 ><DT
221 >4.2. <A 221 >4.2. <A
222 HREF="#AEN911" 222 HREF="#AEN916"
223 >Linker Operation</A 223 >Linker Operation</A
224 ></DT 224 ></DT
225 ><DT 225 ><DT
226 >4.3. <A 226 >4.3. <A
227 HREF="#AEN925" 227 HREF="#AEN930"
228 >Linking Scripts</A 228 >Linking Scripts</A
229 ></DT 229 ></DT
230 ><DT 230 ><DT
231 >4.4. <A 231 >4.4. <A
232 HREF="#AEN991" 232 HREF="#AEN996"
233 >Format Specific Linking Notes</A 233 >Format Specific Linking Notes</A
234 ></DT 234 ></DT
235 ><DD 235 ><DD
236 ><DL 236 ><DL
237 ><DT 237 ><DT
238 >4.4.1. <A 238 >4.4.1. <A
239 HREF="#AEN994" 239 HREF="#AEN999"
240 >OS9 Modules</A 240 >OS9 Modules</A
241 ></DT 241 ></DT
242 ></DL 242 ></DL
243 ></DD 243 ></DD
244 ></DL 244 ></DL
245 ></DD 245 ></DD
246 ><DT 246 ><DT
247 >5. <A 247 >5. <A
248 HREF="#AEN1006" 248 HREF="#AEN1011"
249 >Libraries and LWAR</A 249 >Libraries and LWAR</A
250 ></DT 250 ></DT
251 ><DD 251 ><DD
252 ><DL 252 ><DL
253 ><DT 253 ><DT
254 >5.1. <A 254 >5.1. <A
255 HREF="#AEN1010" 255 HREF="#AEN1015"
256 >Command Line Options</A 256 >Command Line Options</A
257 ></DT 257 ></DT
258 ></DL 258 ></DL
259 ></DD 259 ></DD
260 ><DT 260 ><DT
272 ><B 272 ><B
273 >List of Tables</B 273 >List of Tables</B
274 ></DT 274 ></DT
275 ><DT 275 ><DT
276 >6-1. <A 276 >6-1. <A
277 HREF="#AEN1093" 277 HREF="#AEN1098"
278 >Object File Term Types</A 278 >Object File Term Types</A
279 ></DT 279 ></DT
280 ><DT 280 ><DT
281 >6-2. <A 281 >6-2. <A
282 HREF="#AEN1123" 282 HREF="#AEN1128"
283 >Object File Operator Numbers</A 283 >Object File Operator Numbers</A
284 ></DT 284 ></DT
285 ></DL 285 ></DL
286 ></DIV 286 ></DIV
287 ><DIV 287 ><DIV
2578 >1D1E 7D1D1D TST WHICH1 ;.7d1d1d 2578 >1D1E 7D1D1D TST WHICH1 ;.7d1d1d
2579 1D21 2A0139 BMI ?RTS ;.2a0139 2579 1D21 2A0139 BMI ?RTS ;.2a0139
2580 1D24 1D24 FDB * ;.1d24 2580 1D24 1D24 FDB * ;.1d24
2581 1D26 xyz INV ;.E:32 (Error 32 is "Bad opcode")</PRE 2581 1D26 xyz INV ;.E:32 (Error 32 is "Bad opcode")</PRE
2582 ></DD 2582 ></DD
2583 ><DT
2584 >emuext</DT
2585 ><DD
2586 ><P
2587 >&#13;This pragma enables two instructions useful when running code in compatible
2588 emulators. Break breaks into the debugger. Log writes printf-style
2589 output to the debug window&#13;</P
2590 ><PRE
2591 CLASS="PROGRAMLISTING"
2592 > LOG ; log output
2593 FDB FSTR ; pointer to format string
2594 FDB PX1 ; 16 bit pointer to 16 bit value
2595 FDB PY1 ; 16 bit pointer to 8 bit value (see format string!)
2596 FDB PX2 ; 16 bit pointer to 16 bit value
2597 FDB PY2 ; 16 bit pointer to 8 bit value
2598 ; execution continues here ...
2599 RTS
2600
2601 ; format string
2602 FSTR FCC "%hu,%hhu - %hu,%hhu"
2603 FCB 10,0</PRE
2604 ></DD
2583 ></DL 2605 ></DL
2584 ></DIV 2606 ></DIV
2585 ><P 2607 ><P
2586 >As a convenience, each input file has a pragma state stack. This 2608 >As a convenience, each input file has a pragma state stack. This
2587 allows, through the use of *PRAGMAPUSH and *PRAGMAPOP, a file to change a 2609 allows, through the use of *PRAGMAPUSH and *PRAGMAPOP, a file to change a
2627 ><DIV 2649 ><DIV
2628 CLASS="SECTION" 2650 CLASS="SECTION"
2629 ><HR><H2 2651 ><HR><H2
2630 CLASS="SECTION" 2652 CLASS="SECTION"
2631 ><A 2653 ><A
2632 NAME="AEN805" 2654 NAME="AEN810"
2633 >3.12. Cycle Counts</A 2655 >3.12. Cycle Counts</A
2634 ></H2 2656 ></H2
2635 ><P 2657 ><P
2636 >&#13;The following options for displaying cycle counts in listings are provided. 2658 >&#13;The following options for displaying cycle counts in listings are provided.
2637 These options are enabled from pragmas on the command line or in the 2659 These options are enabled from pragmas on the command line or in the
2666 ></DIV 2688 ></DIV
2667 ><DIV 2689 ><DIV
2668 CLASS="CHAPTER" 2690 CLASS="CHAPTER"
2669 ><HR><H1 2691 ><HR><H1
2670 ><A 2692 ><A
2671 NAME="AEN811" 2693 NAME="AEN816"
2672 ></A 2694 ></A
2673 >Chapter 4. LWLINK</H1 2695 >Chapter 4. LWLINK</H1
2674 ><P 2696 ><P
2675 >The LWTOOLS linker is called LWLINK. This chapter documents the various features 2697 >The LWTOOLS linker is called LWLINK. This chapter documents the various features
2676 of the linker.</P 2698 of the linker.</P
2677 ><DIV 2699 ><DIV
2678 CLASS="SECTION" 2700 CLASS="SECTION"
2679 ><HR><H2 2701 ><HR><H2
2680 CLASS="SECTION" 2702 CLASS="SECTION"
2681 ><A 2703 ><A
2682 NAME="AEN814" 2704 NAME="AEN819"
2683 >4.1. Command Line Options</A 2705 >4.1. Command Line Options</A
2684 ></H2 2706 ></H2
2685 ><P 2707 ><P
2686 >The binary for LWLINK is called "lwlink". Note that the binary is in lower 2708 >The binary for LWLINK is called "lwlink". Note that the binary is in lower
2687 case. lwlink takes the following command line arguments.</P 2709 case. lwlink takes the following command line arguments.</P
2875 ><DIV 2897 ><DIV
2876 CLASS="SECTION" 2898 CLASS="SECTION"
2877 ><HR><H2 2899 ><HR><H2
2878 CLASS="SECTION" 2900 CLASS="SECTION"
2879 ><A 2901 ><A
2880 NAME="AEN911" 2902 NAME="AEN916"
2881 >4.2. Linker Operation</A 2903 >4.2. Linker Operation</A
2882 ></H2 2904 ></H2
2883 ><P 2905 ><P
2884 >&#13;LWLINK takes one or more files in supported input formats and links them 2906 >&#13;LWLINK takes one or more files in supported input formats and links them
2885 into a single binary. Currently supported formats are the LWTOOLS object 2907 into a single binary. Currently supported formats are the LWTOOLS object
2931 ><DIV 2953 ><DIV
2932 CLASS="SECTION" 2954 CLASS="SECTION"
2933 ><HR><H2 2955 ><HR><H2
2934 CLASS="SECTION" 2956 CLASS="SECTION"
2935 ><A 2957 ><A
2936 NAME="AEN925" 2958 NAME="AEN930"
2937 >4.3. Linking Scripts</A 2959 >4.3. Linking Scripts</A
2938 ></H2 2960 ></H2
2939 ><P 2961 ><P
2940 >A linker script is used to instruct the linker about how to assemble the 2962 >A linker script is used to instruct the linker about how to assemble the
2941 various sections into a completed binary. It consists of a series of 2963 various sections into a completed binary. It consists of a series of
3135 ><DIV 3157 ><DIV
3136 CLASS="SECTION" 3158 CLASS="SECTION"
3137 ><HR><H2 3159 ><HR><H2
3138 CLASS="SECTION" 3160 CLASS="SECTION"
3139 ><A 3161 ><A
3140 NAME="AEN991" 3162 NAME="AEN996"
3141 >4.4. Format Specific Linking Notes</A 3163 >4.4. Format Specific Linking Notes</A
3142 ></H2 3164 ></H2
3143 ><P 3165 ><P
3144 >Some formats require special information to be able to generate actual 3166 >Some formats require special information to be able to generate actual
3145 binaries. If the specific format you are interested in is not listed in 3167 binaries. If the specific format you are interested in is not listed in
3148 ><DIV 3170 ><DIV
3149 CLASS="SECTION" 3171 CLASS="SECTION"
3150 ><HR><H3 3172 ><HR><H3
3151 CLASS="SECTION" 3173 CLASS="SECTION"
3152 ><A 3174 ><A
3153 NAME="AEN994" 3175 NAME="AEN999"
3154 >4.4.1. OS9 Modules</A 3176 >4.4.1. OS9 Modules</A
3155 ></H3 3177 ></H3
3156 ><P 3178 ><P
3157 >OS9 modules need to embed several items into the module header. These 3179 >OS9 modules need to embed several items into the module header. These
3158 items are the type of module, the langauge of the module, the module 3180 items are the type of module, the langauge of the module, the module
3224 ></DIV 3246 ></DIV
3225 ><DIV 3247 ><DIV
3226 CLASS="CHAPTER" 3248 CLASS="CHAPTER"
3227 ><HR><H1 3249 ><HR><H1
3228 ><A 3250 ><A
3229 NAME="AEN1006" 3251 NAME="AEN1011"
3230 ></A 3252 ></A
3231 >Chapter 5. Libraries and LWAR</H1 3253 >Chapter 5. Libraries and LWAR</H1
3232 ><P 3254 ><P
3233 >LWTOOLS also includes a tool for managing libraries. These are analogous to 3255 >LWTOOLS also includes a tool for managing libraries. These are analogous to
3234 the static libraries created with the "ar" tool on POSIX systems. Each library 3256 the static libraries created with the "ar" tool on POSIX systems. Each library
3243 ><DIV 3265 ><DIV
3244 CLASS="SECTION" 3266 CLASS="SECTION"
3245 ><HR><H2 3267 ><HR><H2
3246 CLASS="SECTION" 3268 CLASS="SECTION"
3247 ><A 3269 ><A
3248 NAME="AEN1010" 3270 NAME="AEN1015"
3249 >5.1. Command Line Options</A 3271 >5.1. Command Line Options</A
3250 ></H2 3272 ></H2
3251 ><P 3273 ><P
3252 >The binary for LWAR is called "lwar". Note that the binary is in lower 3274 >The binary for LWAR is called "lwar". Note that the binary is in lower
3253 case. The options lwar understands are listed below. For archive manipulation 3275 case. The options lwar understands are listed below. For archive manipulation
3444 followed by any data required by the term. Then end of the list is flagged 3466 followed by any data required by the term. Then end of the list is flagged
3445 by a NULL expression (only an end of expression term).</P 3467 by a NULL expression (only an end of expression term).</P
3446 ><DIV 3468 ><DIV
3447 CLASS="TABLE" 3469 CLASS="TABLE"
3448 ><A 3470 ><A
3449 NAME="AEN1093" 3471 NAME="AEN1098"
3450 ></A 3472 ></A
3451 ><P 3473 ><P
3452 ><B 3474 ><B
3453 >Table 6-1. Object File Term Types</B 3475 >Table 6-1. Object File Term Types</B
3454 ></P 3476 ></P
3516 allows local symbols that are not exported to have the same names as 3538 allows local symbols that are not exported to have the same names as
3517 exported symbols or external references.</P 3539 exported symbols or external references.</P
3518 ><DIV 3540 ><DIV
3519 CLASS="TABLE" 3541 CLASS="TABLE"
3520 ><A 3542 ><A
3521 NAME="AEN1123" 3543 NAME="AEN1128"
3522 ></A 3544 ></A
3523 ><P 3545 ><P
3524 ><B 3546 ><B
3525 >Table 6-2. Object File Operator Numbers</B 3547 >Table 6-2. Object File Operator Numbers</B
3526 ></P 3548 ></P