summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1998-07-01 01:00:00 +0200
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:40:31 +0200
commitec5f28e3f1400b5dacb88eda2d9db472a20b4349 (patch)
treeb3215b2306709d0412fd7845c78ca63ccaa2e29b /man
parent2f828530e36a02c5b4c534e42ab812370c2bf7d9 (diff)
downloaddev86-ec5f28e3f1400b5dacb88eda2d9db472a20b4349.tar.gz
Import Dev86src-0.14.3.tar.gzv0.14.3
Diffstat (limited to 'man')
-rw-r--r--man/as86.168
-rw-r--r--man/ld86.138
2 files changed, 96 insertions, 10 deletions
diff --git a/man/as86.1 b/man/as86.1
index eb64139..25c1515 100644
--- a/man/as86.1
+++ b/man/as86.1
@@ -139,24 +139,61 @@ Address of the start of the current line.
Either of these marks the start of a comment. In addition any 'unexpected'
character at the start of a line is assumed to be a comment.
.TP
-.B #
-Prefix for immediate operands.
-.TP
.B $
Prefix for hexadecimal numbers, the 'C' syntax, eg\ 0x1234, is also accepted.
.TP
.B %
Prefix for binary numbers.
.TP
+.B #
+Prefix for immediate operands.
+.TP
.B [ ]
Specifies an indirect operand.
.br
-Offsets from registers are represented by adding the register to the
-expression inside the
-.B [ ]
-brackets. eg:
+Unlike MASM the assembler has no type information on labels just a
+segment and offset. This means that the way this operator and the
+immediate prefix work are like traditional assemblers.
+.sp
+Examples:
.br
- MOV AX,[BX+Table]
+ mov ax,bx
+.br
+ jmp bx
+.br
+Direct register addressing, the jump copies BX into PC.
+.sp
+.nf
+ mov ax,[bx]
+ jmp [bx]
+.fi
+Simple indirect register addressing, the jump moves the contents of the location specified by BX into the PC.
+.sp
+ mov ax,#1234
+.br
+Immediate value, ax becomes 1234.
+.sp
+.nf
+ mov ax,1234
+ mov ax,_hello
+ mov ax,[_hello]
+.fi
+Absolute addressing, ax is set to contents of location 1234. Note the
+third option is not strictly consistant but is in place mainly for asld
+compatibility.
+
+.sp
+.nf
+ mov ax,_table[bx]
+ mov ax,_table[bx+si]
+ mov eax,_table[ebx*4]
+
+ mov ax,[bx+_table]
+ mov ax,[bx+si+_table]
+ mov eax,[ebx*4+_table]
+.fi
+Indexed addressing, both formats are ok, I think the first is more correct
+but I tend to used the second. :-)
.br
.P
Conditionals
@@ -186,7 +223,7 @@ Label type definition
Export label defined in this object
.TP
.B ENTRY
-Force linker to include label in a.out
+Force linker to include the specified label in a.out
.TP
.B .GLOBL .GLOBAL
Define label as external and force import even if it isn't used.
@@ -312,8 +349,19 @@ TR3 TR4 TR5 TR6 TR7 ST
.TP
Operand type specifiers
BYTE DWORD FWORD FAR PTR PWORD QWORD TBYTE WORD NEAR
+.sp
+The 'near and 'far' do not allow multi-segment programming, all 'far'
+operations are specified explicitly through the use of the instructions:
+jmpi, jmpf, callf, retf, etc. The 'Near' operator can be used to force
+the use of 80386 16bit conditional branches. The 'Dword' and 'word'
+operators can control the size of operands on far jumps and calls.
+
.TP
-General instructions understood.
+General instructions.
+These are in general the same as the instructions found in any 8086 assembler,
+the main exceptions being a few 'Bcc' (BCC, BNE, BGE, etc) instructions
+which are shorthands for a short branch plus a long jump.
+.sp
AAA AAD AAM AAS ADC ADD AND ARPL BCC BCS BEQ BGE BGT BHI BHIS BLE BLO
BLOS BLT BMI BNE BOUND BPC BPL BPS BR BVC BVS CALL CALLF CALLI CBW CLC
CLD CLI CMC CMP CMPS CMPSB CMPSD CMPSW CMPW CSEG CWD CWDE CDQ DAA DAS
diff --git a/man/ld86.1 b/man/ld86.1
index 4f14bd7..77953a8 100644
--- a/man/ld86.1
+++ b/man/ld86.1
@@ -95,6 +95,44 @@ produce "unmapped zero page" executables
.P
All the options not taking an argument may be turned off by following the
option letter by a '-', as for cc1.
+.SH PREDEFINED LABELS
+The linker predefines several labels that can be imported into user programs.
+.TP
+.B __etext
+Standard C variable for the end of the text segment.
+.TP
+.B __edata
+Standard C variable for the end of the initilised data.
+.TP
+.B __end
+Standard C variable for the end of the bss area.
+.TP
+.B __segoff
+The offset within the executable file between the start of the text segment
+and the start of the data segment in 16 byte 'paragraphs'. Note this is
+.B zero
+for impure (tiny model) executables and is adjusted for executables that
+don't start at offset 0 within the segment.
+.TP
+.B __segXDL
+The lowest address with data in segment 'X'. (eg __seg0DL is for segment zero
+or the text segment, __seg3DL is for the data segment)
+The value 'X' is a hex digit.
+.TP
+.B __segXDH
+The top of segment 'X's data area.
+.TP
+.B __segXCL
+The bottom of segment 'X's 'common data' or unitilised data area. Each
+segment has both an initilised and unitilised data area.
+.TP
+.B __segXCH
+The top of segment 'X's common area.
+.TP
+.B __segXSO
+This is the adjusted offset from segment 0 of the start of segment 'X'
+in 'paragraphs'.
+
.SH HISTORY
The 6809 version does not support -i.