ASM 286 does not possess a group directive as in ASM 86. By giving the segments the same name, they will be grouped together into one segment at link time.
Example: ASM 86
DATAGRP GROUP DATA 1, DATA2 DATA1 SEGMENT ' ABYTE DBO
DATA1 ENDS DATA2 SEGMENT
AWORDDWO '
DATA2ENDS
ASSUME DS:DATAGRP : ASM286
DATA1 SEGMENT RW PUBLIC ABYTEDBO
DATA1 ENDS
DATA1 SEGMENT RW PUBLIC AWORDDWO
DATA1 ENDS ASSUME DS:DATA1
Segment Directive
In one module
In another module
The fields of the SEGMENT directive
,are
also different. ASM 286 does not use anything but para-aligned andaccess-type; "
Example: ASM 86
NAME SEGMENT [ALIGN·TYPE) [COMBINE·TYPE)
WHERE [ALlGN·TYPE)
=
PARA, BYTE, WORD, PAGE, INPAGE, OR NONEASM286
NAME SEGMENT [ACCESS·TYPE) [COMBINE·TYPE) WHERE SEGMENT IS ALWAYS PARA·ALlGNED AND
[ACCESS·TYPE)
=
READ-ONLY (RO), EXECUTE·ONLY (EO), EXECUTE-READ (ER), or READ·WRITE (RW) Class name is also not present in ASM 286AP-405
Stack Segment
In ASM 286, stack segments are defined using the STACKSEG directive.
Example: ASM 286
PROG_STACK STACKSEG 10; /* MEANS 10 BYTES ON STACK * /
The operator STACKSTART is used to define a label at the beginning of the stack to initialize the Stack Pointer (SP).
Example: ASM 286
MOV Sp, STACKSTART PROG_STACK
Selector Access
In ASM 286 the selectors used for the DS, SS, and ES in the ASSUME directive must have certain access types.
Example: ASM 286 ASSUME DS:EDATA
EDATA SEGMENT RW PUBLIC WHERE DBO EDATAENDS
Further, the ASSUME directive will not accept an assume for the code segment. The current code segment being assem-bled is automatically assumed into the CS. For more information regarding other changes in ASM 286 consult: ASM 286 Reference Manual (Appendix G), order #122671 .
LANGUAGES: PL/M 286
Users migrating their code to PLiM 286 should be aware of the following:
Pointer and Selector Variables
Pointer and selector variables cannot be assigned absolute values. All values must be assigned by reference to another variable or through based-variables.
Example: PLIM 86 Declare
A$POINTER Start: DO;
POINTER;
A$POINTER = 0;
Example: PLIM 286 Declare
A$POINTER Start: DO;
POINTER;
A$POINTER
=
NIL;AP-405
Similarly selectors can be assigned values as follows:
Example: PUM 86
Declare token literally 'WORD',
A$TOKEN TOKEN;
Start: DO;
A$TOKEN = 0;
Example: PLIM 286
Declare token literally 'SELECTOR',
A$TOKEN TOKEN;
Start: DO;
A$TOKEN = SELECTOR$OF(NIL);
The only relational operations allowed in PUM 286 for pointers and selectors are "equals" and "not equals".
Models of Compilation In PUM 86 the default is SMALL In PUM 286 the default is LARGE
Interrupt Vectors
In PUM 286 all interrupt numbers on all interrupt procedures must be deleted. The required interrupt vectors will be assigned by the 80286 system builder if not already defined by the iRMX 286 operating system call RQ$SET$
INTERRUPT.
Consequently the PUM 86 built-ins SET$INTERRUPT and INTERRUPT$PTR are unavailable in PUM 286 and should be removed. Also, all calls to interrupt procedures are not allowed. As the conversion process takes shape, all of these changes tum out better than initially expected as the following example shows.
Example: PLIM .86 1. DECLARE
2.
ZERO LITERALLY '00001000b',
INTERRUPT_HANDLER POINTER;
· TYPICAL PLIM 86 STATEMENTS
6. INTERRUPLHANOLER: PROCEDURE INTERRUPT 56 PUBLIC REENTRANT;
· TYPICAL PLIM 86 STATEMENTS
10. CALL RO$SIGNAL$INTERRUPT (ZERO, @STATUS);
11. END INTERRUPT_HANDLER;
12. INTERRUPT_TASK : PROCEDURE PUBLIC REENTRANT;
16.
17.
· TYPICAL PUM 86 STATEMENTS
INTERRUPT_HANDLER = INTERRUPT$PTR (INTERRUPLHANDLER);
CALL RO$SET$INTERRUPT (ZERO, 1, INTERRUPLHANDLER, DATA$SEG$ADDRESS.BASE, @STATUS);
· TYPICAL PLIM 86 STATEMENTS
inter
Ap·405Comments Line
Number Description
2. INTERRUPT_HANDLER was defined as a pointer 6. Interrupt entry 56 was."hard-coded"
16. INTERRUPT_HANDLER was assigned the location (address) of the first instruction of the handler via the PLIM 86 built-in "INTERRUPT$PTR"
17. This call could have looked like: RQ$SET$INTERRUPT (ZERO, 1, INTERRUPT _PTR(INTER-RUPT_HANDLER), etc eliminating lines 2 and 16.
Example: PLIM 286
1. DECLARE ZERO LITERALLY '00001000b';
· TYPICAL PLIM 286 STATEMENTS
5. INTERRUPT_HANDLER : PROCEDURE INTERRUPT PUBLIC REENTRANT;
· TYPICAL PLIM 286 STATEMENTS
9. CALL RQ$SIGNAL$INTERRUPT (ZERO,@STATUS);
10. END INTERRUPTHANDLER;
11. INTERRUPT_TASK : PROCEDURE PUBLIC REENTRANT;
· TYPICAL PLIM 286 STATEMENTS
15. CALL RQ$SET$INTERRUPT (ZERO, 1, @INTERRUPLHANDLER,
DATA$SEG$ADDRESS.BASE, @STATUS);
· TYPICAL PLIM 286 STATEMENTS
19. CALL RQ$WAIT$INTERRUPT (ZERO, @STATUS);
20. END INTERRUPT_TASK;
Comments Line
Number Description
5. Notice PLIM 286 does not need to identify the interrupt in this statement
15. The third parameter becomes simply a pointer to the first instruction of the handler.
AP-405
DEVELOPMENT TOOLS - BND 286
All iRMX 86 programs linked using LINK 86 will instead have to be bound using BND 286. BND 286 is used to create all single-task application programs that will be dynamically loaded. (See Figure 5.) The following are tasks of the binder.
1. Creates a linkable or loadable module by combining input modules with other bindable modules.
2. Checks the type of variables and procedures.
3. Selects modules from libraries to resolve all symbolic references.
4. Combines logical segments by name, attribute, and privilege levels into physical segments that the processor can manipulate efficiently.
5. Can create a module the application loader can load.
Linkable Modules
In a process called incremental linking, BND 286 combines linkable object modules, including library modules, output by translators. The result is a file containing a linkable module.
Loadable Modules
A dynamically loadable module created by BND 286 is an executable module created by the combination of one or more linkable modules. Loadable modules can be of two types:
1. Single-task loadable (STL) 2. Variable-task loadable (VTL)
SOURCE
-INPUT AND OUTPUT OF SOFTWARE PRODUCTS