"IBM personal computer assembly language tutorial" - читать интересную книгу автора (Auerbach J.)complex options such as the GROUP statement and the use of other "combine
types" and "classes." I don't recommend getting into any of that. I will talk more about the linker and modular construction of programs a little later. The assembler manual also implies that a STACK segment is required. This is not really true. There are numerous ways to assure that you have a valid stack at execution time. Of course, if you plan to write applications in assembler which are more than 64K in size, you will need more than what I have told you; but who is really going to do that? Any application that large is likely to be coded in a higher level language. The third form of the SEGMENT statement makes the delineated section into something like a "DSECT;" that is, it doesn't generate any code, it just describes what is present somewhere already in the computer's memory. Sometimes the AT value you give is meaningful. For example, the BIOS work area is located at location 40 hex. So, you might see BIOSAREA SEGMENT AT 40H ;Map BIOS work area ORG BIOSAREA+10H EQUIP DB ? ;Location of equipment flags, first byte BIOSAREA ENDS in a program which was interested in mucking around in the BIOS work area. mapping a repeated control block: IBM PC Assembly Language Tutorial 18 PROGPREF SEGMENT AT 0 ;Really a DSECT mapping the program prefix ORG PROGPREF+6 MEMSIZE DW ? ;Size of available memory PROGPREF ENDS Really, no matter whether the AT value represents truth or fiction, it is your responsibility, not the assembler's, to get set up a segment register so that you can really reach the storage in question. So, you can't say MOV AL,EQUIP unless you first say something like MOV AX,BIOSAREA ;BIOSAREA becomes a symbol with value 40H MOV ES,AX ASSUME ES:BIOSAREA Enough about SEGMENT. The END statement is simple. It goes at the end of |
|
© 2025 Библиотека RealLib.org
(support [a t] reallib.org) |