home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug103.arc
/
HISTORY
< prev
next >
Wrap
Text File
|
1979-12-31
|
11KB
|
233 lines
Small-Mac Quirks and Revisions page 1
QUIRKS
1. The Small-Mac package does not use all of the possible link
items which may appear in a Microsoft .REL file. Therefore, LNK
may not successfully link a Microsoft created .REL module
especially if it was created by a high level language compiler.
Neither will .DREL recognize Microsoft's "Extension Link Items."
2. When configured for the Z80, the assembler will run slower
than usual due to the fact that variants of a mnemonic are
searched sequentially in the machine instruction table. The Z80
has an unusually large number of variants of several mnemonics
(e.g. LD ...). If one has an idea of the relative frequency of
use of the variants, he can reorder the machine instruction
table placing the most used variants first. But be warned,
without a thorough knowledge of the function match() (in MIT.C)
you may cause the assembler to mismatch instructions. For
instance, if "LD A,(x)" precedes "LD A,(HL)" in the table, then
cases of the latter in a program will be assembled as though
they were the first, causing an "undefined" error on the
mistaken expression "HL". Take care also to keep all
occurrences of a given mnemonic op-code contiguous in the table.
3. The Small-Mac assembler tries to recognize an instruction
first as a machine instruction and then as an assembler
instruction (pseudo-op). This is to improve effeciency since
the number of machine instructions in a program vastly exceeds
the number of pseudo-ops. Since a free field format is allowed,
it is possible for a machine instruction to begin in character
position 1 of a line. These considerations lead to the result
that you may confuse the assembler by coding a pseudo-op which
is prededed by a non-label symbol which matches a machine
instruction. Thus the line "LXI EQU 5" will be taken as the
machine instruction "LXI" with an invalid expression of "EQU 5".
However the line "LXI: CALL ABC" will process properly because
the "LXI:" is known to be a label by its trailing colon.
4. Small-Mac does not handle forward references in EQU and SET
assembler instructions. Such references will resolve to
absolute zero.
REVISIONS
-- March, 1985; inluded in version 1.0
1. Getrel(), putrel(), and seerel() now handle the end-of-file
item in .REL files and libraries correctly. Only 7 bits are
read/written and the current byte is finished out. (previously
reported as fix-1)
Small-Mac Quirks and Revisions page 2
2. LNK now looks for a .NDX file on the same drive as its .LIB
file. It used to look on the default drive. (previously
reported as fix-2)
3. MAC2.C has been modified to prevent the possibility of an
infinite loop in stfind(). This would happen in the case where
a symbol hashed to position 0 in the symbol table. (previously
reported as fix-3)
4. The function primary() in MAC3.C has been modified to correct
an error in code generation when the first reference to an
external symbol (defined with ##) has an offset (e.g., ABC##+5).
The statement "*t = XRBIT|ABS;" was added before the label
"doxr:". (previously reported as fix-4)
5. Added the -S# switch to MAC. It sets the size of the symbol
table to handle a maximum of # symbols. Default is 500.
Performance will degrade as the symbol table reaches capacity,
so leave some cushion space. (previously reported as
enhancement-1)
-- July, 1985; inluded in version 1.1; reported in bulletin 1
6. The line "if(bump) field += loc;" in doloc() (file MAC2.C)
has been corrected to read "if(bump) field = loc += field;".
This error caused DS directives to have no effect. (previously
reported as fix-5)
7. In the function load() (file LNK.C) two changes were made.
The statement "field = field + cmod;" was inserted as the first
statement following "case SETLC:". This corrects an error in
which a second or subsequent load module containing DS or ORG
directives reserves insufficient (possibly no) space. ("field +=
cmod;" would be slightly better, provided your Small-C compiler
contains fix #64.) A "break;" statement was inserted as the last
statement controlled by "case SETLC:". This prevents control
from falling through "case XPOFF:" resulting in an erroneous
offset being added to the next program relative item in the .REL
file. (previously reported as fix-6)
8. Range checking for one byte, PC relative items was added.
MAC now gives the message "- Range Error" on attempts to make PC
relative references that are more than 127 bytes ahead or 128
bytes behind the instruction following the one making the
reference. Note: The PC has already advanced when the CPU
calculates an operand address. (previously reported as
enhancement-2)
-- August, 1985; inluded in version 1.2; reported in bulletin 2
9. Signon messages were added to all programs in the Small-Mac
package.
Small-Mac Quirks and Revisions page 3
10. Hex constants of four digits plus a leading zero were
rejected by MAC. The problem was xtoi() in the Small-C library.
It was rewritten and reported as Small-C revision 66.
11. An invalid number in the operand field of a DB or DW
instruction would cause MAC to loop forever in dodat() (file
MAC2.C). The fix was to have getnum() (file MAC3.C) report the
error and advance over the offending field.
12. The symbols EOF (file STDIO.H) and XRPLUS (file LNK.C) both
have the value -1. This causes readref() (file LNK.C) to handle
end-of-file in a messy way. The solution is to change the
definition of XRPLUS to -2.
13. The statement "putint(snext, snext -= SSZ);" in newtbl()
(file LNK.C) depends on Small-C's practice of evaluating
function arguments left to right. To make this statement
compiler independent, it was rewritten as
"putint(snext, snext - SSZ); snext -= SSZ;".
14. Revise the expression analyzer (file MAC3.C) to make it more
efficient and compiler independent (by eliminating Small-C
argument count passing).
15. Revise the expression analyzer (file MAC3.C) to accept a
quoted character as a number expressing its code value.
17. Fix an eternal loop in replace() (file MAC.C) when a macro
expansion overflows the maximum line size.
18. Make EQU and SET instructions show their values in the
assembly listing on the same line. Flag them with an equal
symbol (=).
19. Change the symbol table dump at the end of the assembly
listing to a four column format.
20. Prevent the expression analyzer in MAC from accepting
incomplete expressions.
21. Correct an error in match() (file MIT.C) which caused
erroneous "- Bad Operation" errors on instructions having
several operand variants, for which expressions are required, in
the machine instruction table.
-- October, 1985; reported in bulletin 3
22. Insert the missing instruction 21_x2 LD HL,x into Z80.MIT
following 2A_x2 LD HL,(x).
Small-Mac Quirks and Revisions page 4
23. Correct an error in CMIT.C which caused it to mistakenly
construct the Z-80 machine instruction table such that any
return instruction except RET, RET C, RET M, RET NC, and RET NZ
generate F0, the code for RET P.
24. Correct an error in LNK.C which corrupted the program being
linked when an offset is applied to the first reference to an
external symbol (e.g., LDA EXTLAB##+5).
25. Provide an additional option (-L) to list entry point
locations and symbols.
-- November 1985; reported in bulletin 4
26. Properly handle external references in DW directives.
27. Force an expression error when a binary operator operates on
two relocatable values of which at least one is an external
reference. The other invalid combinations were already being
caught. The only valid combinations involving external
references are abs+ext, ext+abs, and ext-abs.
28. Delete the output file if errors are detected so LNK will
not attempt to process bad object modules. Otherwise,
relocation and expression errors could corrupt external
reference chains making LNK go berserk.
29. Microsoft's M80 occasionally folds the underscore character
to a value lower than A to Z in the ASCII sequence. Therefore,
at the end of an object module, it emits entry points and
external references out of sequence. And that causes LNK to
loop endlessly while loading its symbol tables. This revision
allows LNK to deal with this contingency.