Skip to content

Commit

Permalink
updated to r2249 from svn repo
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Oct 30, 2020
1 parent d231848 commit 6fdb318
Show file tree
Hide file tree
Showing 16 changed files with 470 additions and 385 deletions.
47 changes: 28 additions & 19 deletions 64tass.1
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ Also it's hard to notice that an unchanged call turned into label after the
definition got renamed. This warning helps to find such calls so that prefixes
can be added.
.TP 0.5i
\fB\-Wno\-addr\-wrap\fR
Don't warn about memory location address space wrap around.
If a memory location ends up outside of the processors address space then just wrap it around.
.TP 0.5i
\fB\-Wno\-deprecated\fR
Don't warn about deprecated features.
Unfortunately there were some features added previously which shouldn't
Expand Down Expand Up @@ -227,27 +223,44 @@ You may disable this if you use labels which look like mistyped versions of
implied addressing mode instructions and you don't want to put them in the
first column.
.TP 0.5i
\fB\-Wno\-mem\-wrap\fR
Don't warn for compile offset wrap around.
Continue from the beginning of image file once it's end was reached.
.TP 0.5i
\fB\-Wno\-page\fR
Don't do an error for page crossing.
.TP 0.5i
\fB\-Wno\-pc\-wrap\fR
Don't warn for program counter wrap around.
Continue from the beginning of program bank once it's end was reached.
.TP 0.5i
\fB-Wno\-pitfalls\fR
Don't note on common pitfalls.
Experts don't need notes about how to fix things ;)
.TP 0.5i
\fB\-Wno\-portable\fR
Don't warn about source portability problems.
.TP 0.5i
\fB\-Wno\-size\-larger\fR
Don't warn if size is larger due to negative offset
Negative offsets add space in front of memory area that's out of bound. Sometimes this may be fine.
.TP 0.5i
\fB\-Wno\-star\-assign\fR
Don't warn about ignored compound multiply.
.TP 0.5i
\fB\-Wno\-wrap\-addr\fR
Don't warn about address space calculation wrap around.
If a memory location ends up outside of the processors address space then just wrap it around.
.TP 0.5i
\fB\-Wno\-wrap\-bank0\fR
Don't warn for bank 0 address calculation wrap around.
.TP 0.5i
\fB\-Wno\-wrap\-dpage\fR
Don't warn for direct page address calculation wrap around.
.TP 0.5i
\fB\-Wno\-wrap\-mem\fR
Don't warn for compile offset wrap around.
Continue from the beginning of image file once it's end was reached.
.TP 0.5i
\fB\-Wno\-wrap\-pbank\fR
Don't warn for program bank address calculation wrap around.
.TP 0.5i
\fB\-Wno\-wrap\-pc\fR
Don't warn for program counter bank crossing.
If it's data only and the programmer deals with it then this might be ok.
.TP 0.5i
\fB\-Wold\-equal\fR
Warn about old equal operator.
The single '=' operator is only there for compatibility reasons and should
Expand All @@ -263,10 +276,6 @@ Warn about symbol shadowing.
Checks if local variables 'shadow' other variables of same name in upper
scopes in ambiguous ways.
.TP 0.5i
\fB\-Wno\-size\-larger\fR
Don't warn if size is larger due to negative offset
Negative offsets add space in front of memory area that's out of bound. Sometimes this may be fine.
.TP 0.5i
\fB\-Wstrict\-bool\fR
Warn about implicit boolean conversions.
Boolean values can be interpreted as numeric 0/1 and other types as booleans. This is convenient but may cause mistakes.
Expand All @@ -277,15 +286,15 @@ Warn about multiple switch case matches
\fB\-Wunused\fR
Warn about unused constant symbols, any type.
.TP 0.5i
\fB\-Wunused-macro\fR
Warn about unused macros.
.TP 0.5i
\fB\-Wunused-const\fR
Warn about unused constants.
.TP 0.5i
\fB\-Wunused-label\fR
Warn about unused labels.
.TP 0.5i
\fB\-Wunused-macro\fR
Warn about unused macros.
.TP 0.5i
\fB\-Wunused-variable\fR
Warn about unused variables.
.SS Target selection options
Expand Down
133 changes: 72 additions & 61 deletions 64tass.c

Large diffs are not rendered by default.

207 changes: 103 additions & 104 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -1396,8 +1396,7 @@ The compile offset is where the data and code ends up in memory (or in image
file).

The program counter is what labels get set to and what the special star label
refers to. It wraps when the border of a 64 KiB program bank is crossed. The
actual program bank is not incremented, just like on a real processor.
refers to.

Normally both are the same (code is compiled to the location it runs from) but
it does not need to be.
Expand Down Expand Up @@ -3260,6 +3259,13 @@ default, the others are disabled.
This check is there to catch typos, unsupported implied instructions, or
unknown aliases and not for enforcing label placement.

-Wno-page
Don't do an error for page crossing

Normally the .page directive gives an error on page crossing, this
directive can disable it. Using `-Wno-error=page' can turn it into a
warning only.

-Wno-pitfalls
Don't note about common pitfalls.

Expand All @@ -3279,6 +3285,29 @@ default, the others are disabled.
There's a signed variant for the immediate addressing so `lda #+xx'
will make it work

-Wno-portable
Don't warn about source portability problems.

These cross platform development annoyances are checked for:

+ Case insensitive use of file names or use of short names.
+ Use of backslashes for path separation instead of forward slashes.
+ Use of reserved characters in file names.
+ Absolute paths
-Wno-size-larger
Don't warn if size is larger due to negative offset

size() and len() can be used to measure a memory area. Normally there's no
offset used but a positive offset may be used to reduce available space up
until nothing remains.

On the other hand if a negative offset is used then more space will be
available (ahead of the area) which may or may not be desired.

var .byte ?, ?, ?
var2 = var - 2 ; start 2 bytes earlier
ldx #size(var2) ; size is 6 bytes due to 2 bytes ahead

-Wno-star-assign
Don't warn about ignored compound multiply.

Expand All @@ -3294,6 +3323,71 @@ default, the others are disabled.
to a separate line, or in case of space allocation it could be improved to
use `.byte ?' or `.fill x'.

-Wno-wrap-addr
Don't warn about memory location address space wrap around.

Applying offsets to memory locations may result in addresses which end up
outside of the processors address space.

For example "tmp" is at $1000 and then it's addressed as lda tmp-$2000 then
the result will be lda $f000 or lda $fff000 depending on the CPU. If this
is fine then this warning can be disabled otherwise it can be made into an
error by using -Werror=wrap-addr.

-Wno-wrap-bank0
Don't warn for bank 0 wrap around.

Adding an offset to a bank 0 address may end up outside of bank 0. If this
happens a warning is issued and the address wraps around.

The warning may be ignored using this command line parameter. Alternatively
it could be turned into an error by using -Werror=wrap-bank0.

-Wno-wrap-dpage
Don't warn for direct page wrap around.

Adding an offset to a direct page address may end up outside of the direct
page. For a 65816 or 65EL02 an alternative addressing mode is used but on
other processors if this happens a warning is issued and the address wraps
around.

The warning may be ignored using this command line parameter. Alternatively
it could be turned into an error by using -Werror=wrap-dpage.

-Wno-wrap-mem
Don't warn for compile offset wrap around.

While assembling the compile offset may reach the end of memory image. If
this happens a warning is issued and the compile offset is set to the start
of image.

The warning may be ignored using this command line parameter. Alternatively
it could be turned into an error by using -Werror=wrap-mem.

The image size depends on the output format. See the Output options section
above.

-Wno-wrap-pc
Don't warn for program counter bank crossing.

While assembling the program counter may reach the end of the current
program bank. If this happens a warning is issued as a real CPU will not
cross the bank on execution. On the other hand some addressing modes handle
bank crosses so this might not be actually a problem for data.

The warning may be ignored using this command line parameter. Alternatively
it could be turned into an error by using -Werror=wrap-pc.

-Wno-wrap-pbank
Don't warn for program bank address calculation wrap around.

Adding an offset to a program bank address may end up outside of the
current program bank. If this happens a warning is issued and the address
wraps around.

The warning may be ignored using this command line parameter. Alternatively
it could be turned into an error by using -Werror=wrap-pbank.

-Wold-equal
Warn about old equal operator.

Expand All @@ -3318,22 +3412,6 @@ default, the others are disabled.
missed. Most CPUs are supported with the notable exception of 65816 and
65EL02, but this could improve in later versions.

-Wno-page
Don't do an error for page crossing

Normally the .page directive gives an error on page crossing, this
directive can disable it. Using `-Wno-error=page' can turn it into a
warning only.

-Wno-portable
Don't warn about source portability problems.

These cross platform development annoyances are checked for:

+ Case insensitive use of file names or use of short names.
+ Use of backslashes for path separation instead of forward slashes.
+ Use of reserved characters in file names.
+ Absolute paths
-Wshadow
Warn about symbol shadowing.

Expand All @@ -3350,20 +3428,6 @@ default, the others are disabled.
.end
asl bl.x ; not ambiguous

-Wno-size-larger
Don't warn if size is larger due to negative offset

size() and len() can be used to measure a memory area. Normally there's no
offset used but a positive offset may be used to reduce available space up
until nothing remains.

On the other hand if a negative offset is used then more space will be
available (ahead of the area) which may or may not be desired.

var .byte ?, ?, ?
var2 = var - 2 ; start 2 bytes earlier
ldx #size(var2) ; size is 6 bytes due to 2 bytes ahead

-Wstrict-bool
Warn about implicit boolean conversions.

Expand Down Expand Up @@ -3395,82 +3459,18 @@ default, the others are disabled.

The following options can be used to be more specific:

-Wunused-macro
Warn about unused macros.
-Wunused-const
Warn about unused constants.
-Wunused-label
Warn about unused labels.
-Wunused-macro
Warn about unused macros.
-Wunused-variable
Warn about unused variables.

Symbols which appear in a default 64tass symbol list file and their root
symbols are treated as used for exporting purposes.

-Wno-wrap-addr
Don't warn about memory location address space wrap around.

Applying offsets to memory locations may result in addresses which end up
outside of the processors address space.

For example "tmp" is at $1000 and then it's addressed as lda tmp-$2000 then
the result will be lda $f000 or lda $fff000 depending on the CPU. If this
is fine then this warning can be disabled otherwise it can be made into an
error by using -Werror=wrap-addr.

-Wno-wrap-bank0
Don't warn for bank 0 wrap around.

Adding an offset to a bank 0 address may end up outside of bank 0. If this
happens a warning is issued and the address wraps around.

The warning may be ignored using this command line parameter. Alternatively
it could be turned into an error by using -Werror=wrap-bank0.

-Wno-wrap-dpage
Don't warn for direct page wrap around.

Adding an offset to a direct page address may end up outside of the direct
page. For a 65816 or 65EL02 an alternative addressing mode is used but on
other processors if this happens a warning is issued and the address wraps
around.

The warning may be ignored using this command line parameter. Alternatively
it could be turned into an error by using -Werror=wrap-dpage.

-Wno-wrap-mem
Don't warn for compile offset wrap around.

While assembling the compile offset may reach the end of memory image. If
this happens a warning is issued and the compile offset is set to the start
of image.

The warning may be ignored using this command line parameter. Alternatively
it could be turned into an error by using -Werror=wrap-mem.

The image size depends on the output format. See the Output options section
above.

-Wno-wrap-pc
Don't warn for program counter wrap around.

While assembling the program counter may reach the end of the current
program bank. If this happens a warning is issued and the address wraps
around.

The warning may be ignored using this command line parameter. Alternatively
it could be turned into an error by using -Werror=wrap-pc.

-Wno-wrap-pbank
Don't warn for program bank address calculation wrap around.

Adding an offset to a program bank address may end up outside of the
current program bank. If this happens a warning is issued and the address
wraps around.

The warning may be ignored using this command line parameter. Alternatively
it could be turned into an error by using -Werror=wrap-pbank.

Target selection on command line

These options will select the default architecture. It can be overridden by
Expand Down Expand Up @@ -3853,6 +3853,9 @@ directive ignored
an assembler directive was ignored for compatibility reasons
expected ? values but got ? to unpack
the number of variables must match the number of values when unpacking
file name uses reserved character '?'
do not use \ : * ? " < > | in file names as some operating systems don't
like these
immediate addressing mode suggested
numeric constant was used as an address which was likely meant as an
immediate value
Expand Down Expand Up @@ -3894,9 +3897,8 @@ possibly redundant if last 'jsr' is changed to 'jmp'
possibly redundant indexing with a constant value
the index register used seems to be constant and there's a way to eliminate
indexing by a constant offset
processor program counter overflow
pc address was set back to the start of actual 64 KiB program bank as end
of bank was reached
processor program counter crossed bank
pc address had crossed into another 64 KiB program bank
program bank address overflow
the calculated memory location address ended up outside of the current
program bank and is now wrapped.
Expand All @@ -3906,9 +3908,6 @@ symbol case mismatch '?'
the file's real name is not '?'
check if all characters match including their case as this is not the real
name of the file
this name uses reserved characters '?'
do not use \ : * ? " < > | in file names as some operating systems don't
like these
unused symbol '?'
this symbol has is not referred anywhere and therefore may be unused
use '/' as path separation '?'
Expand Down
Loading

0 comments on commit 6fdb318

Please sign in to comment.