ASCII signs are often needed in a program. With "text" you can put them down in
an easy way. During the assembling the noted text will be calculated byte for
byte into hex values and then layed down under the actual adress. The text-
string has to be between (").
text "1234"
or
byte 49,50,51,52
The quoation mark itself was signed by a `\`.
Example:
text "\"this text is between 2 quoation marks\"".
PSO "null":
the same meaning as "text", but here the noted text receives a zero byte as an
endmarking. !! Textlenght +1.
null "1234"
or
text "1234"
byte 0
or
byte 49,50,51,52,0
PSO "shift":
In PSO "null" it is expected that you use a zero byte as an ending marking for
text. Another posibility is to set BIT 7 at the last sign of the signchain.
That makes only sence if the order of all used signs are lower than 128 ($80).
shift "1234"
or
byte 49,50,51,52|$80 ; "|" = or, is the same as 52+$80
PSO "time":
The actual date and time are taken over onto the object file on the assembling.
If time given without parameters the string created is as following:
Fri Jun 30 18:43:43 1989
time or time s the parameter "s" creates the same string
time s same, other writing
But you have also the posibility to create the time string with your own
imagines. For this switch over the conserning parameter by the action of
"time":
time weekdaye weekday, 3 letters in english e.g. Mon-Sun
time weekdayg weekday, 2 letters in german e.g. Mo-So
time year year, 1989-????
time monthe month, 3 letters in english e.g. Jan-Dez
time monthg month, 3 letters in german e.g. Jan-Dez
time month month in numbers, 01-12
time day day in numbers, 01-31
time hour hours, 01-23
time min minutes, 00-59
time sec seconds, 00-31
The following example makes it more clear (i hope so):
time weekdayg
byte " "
time day
byte "."
time monthg
byte " "
time year
If you want to assemble on Montag the 22.03.1991, so the following string will
be created:
"Mo 28.Mai 1989"
assemblerloops:
PSO "assloop":
PSO "assend":
Sometimes you have to solve a problem very quick, so that you can not use a
conditionell machine language loop wich asks through a counter for the end of
working. There is the only possibility to write the needed orders x-times into
the machine program. This work is with the help of the assembler loop easier.
With assemlerloops it is possible to assemble a fixed routine as often you want.
e.g. copy a memory area:
The orders between "assloop" and "assend" are writen 5 times into the object
file.
*= $2000
counter set 5
ldx #00
sei ; switch of interrupt
assloop ; begin of an assemblerloop
lda $7000,x ; get byte
sta $8000,x ; put byte
inx
counter set counter-1 ; lower counter
if counter ; counter not zero ?
assend ; yes, go on by .assloop
endif ; counter == zero
cli ; end of loop if counter == Null
... ; more orders
calling the assembler:
The assembler starts by inputting of the following order:
as65 filename [-options]
Filename stands for the name of the file wich should be assembled and
[-options] for free of chose parameters specifing. The parameters can be
combinated.
The assembler reads assembler source-advice of the 6502 processor family out
of an input file, writes the translated object code in an output file and
creates, if you want, a listing. If the assembler during the assembling finds
an include-advice, it ads assembler-codes from other files. The name of the
source-file wich is given to the assembler by calling him must have the
extension ".asm". Is there no extension, or another then ".asm" will
automaticaly added by the assembler. Include filenames are free choseable.
Calling the assembler with delivery of a source file
as65 test.asm or as65 test
The object code, wich the assembler produced, will be written into a file.
The filename is divert from the input filename. The extension changes to
".obj". The file, if it isn`t marked other, will be written into a directory
wich contains the source file.
possible parameters:
-w WARNINGS will be supressed
-p the programcounter will be not shown during the assembling
-P the PC will be shown during the assembling
-f maximal assembler speed
-a creating an ASCII-file too
-s symboltable will be shown on the screen
-S symboltable will be written into a file
-l the assembler creates a listing, wich is shown on the screen
-L same, but into a file
-e all fault messages will be divert to a file, no showing on the screen
-E same, but fault messages will be shown on the screen too
-i define include path
-I extra information while assembling
-D define constant
-d`name` load default adjustments
-o`name` filename of the object file and all created files
assembler options
option -w:
With this option all warnings will be supressed.
see also PSO "warnoff".
option -p:
option -P:
Normally during the assembling the actual programcounter will be shown on the
screen.
"-p" With this option you switch of that function
If you switched off your PC in your source file with the PSO "showpc off", you
can get this function with the option "-P".
see also PSO "showpc".
option -f:
With this option the assembler switches over to maximal speed. The showing of
the programcounter will be supressed, it will only created a object file, the
output directory will be set to "RAM:".
see also PSO "fspeed".
option -a:
The assembler creates beside the object file, wich is binary, an ASCII file
too. The name will be divert from the source file, but it has the extension
".asc".
see also PSO "ascii".
option -s:
option -S:
The symbol table will be shown on the screen using option "-s". If you want
the table to write in a file, so use the option "-S". The file receives the
ending ".sym".
see also PSO "showsym".
option -l:
option -L:
If you choose the option "-L", the assembler creates a listing file. The name
of this listing file will be divert again from the input file, but the exten-
sion is ".lst". Beside the adress the listing file shows the source statements
and the equivalent of them in machine language. With the option "-l" you
divert the output to the screen. There is no creating of a listing file.
see also PSO "liston"
option -e:
option -E:
Normally the fault messages, wich are appearing during the assembling, are
shown on the screen. With the option "-e" you can divert this statement into a
file. That file will have the extension ".err".
With the option "-E" the assembler creates an errorfile too, the showing on the
screen will not be supressed.
see also PSO "error".
option -i:
Search Path for includes.
-i D/
Option -I:
Extra Information while assembling.
Option -D:
Define Symbol. "-D Symbol=10" the constant "Symbol" will be defined an takes
the value of 10. This constant is useable in your source.
option -d:
With the also delivert utility "makedef" default files can be created with own
images. All options we already spoke about can be layed down in this file. With
the option "-d" now this file can loaded later, so that the parameter delivery
is basicly easier. If after "-d" no filename is given so the positions of the
default file "as65.def" will be loaded. The filename must be in single quoation
marks:
-d`filename`.
[option -o:
All files wich will be created by the assembler will be delivert from the name
of the sourcefile. Option "-o" says that all files were createt from the name
given after this option. The name must be in single quoation marks:
-o`filename`.
as65 test.asm -o`my_name`
An example shall make the above mentored options more clear. If you want to
create an ASCII file, the symboltable shall be shown on the screen and written
into a file, faultmessages shall bewritten into a file and all filenames shall
divert from the name "my_name", so the parameter delivery is as follows:
as65 test.asm -asSeo`my_name`
utilitys
ShowOpc:
--------
With the also delivert program ShowOpc you can let you show the processor specific orders and the adressing measure concerning to the hex-values. If you want to inform yourself about e.g. the R65C02, input ShowOpc R65C02. A listing is shown about the useable orders in this CPU. If you input only the programname,ShowOpc, without the statement of the processor, you will receive a listing of possible processortypes. Will the parameter "all" wich follows the programname, you can let show all possible processor types one after the other.
MakeDef:
--------
With this program you can make a default file how you want it. It canbe loaded
by the assembler with the option "-d`name` and a extensive parameter delivery
is not necessary anymore.
MakeDef Test:
-------------
Creates a default file in the actual directory with the name "Test".
Convert:
--------
This utility creates a file in the MOTOROLA S-RECORD format, input is a binary
file. The maximum filesize is 64kB . This created file can now be send to an
e.g. eprommer. The file receives the ending ".tfr".