mirror of
https://github.com/pfusik/xasm.git
synced 2025-02-07 16:30:40 +00:00
X-Assembler 2.3 release (missing source code of the assembler).
This commit is contained in:
parent
88362dba94
commit
4102fd8bb0
BIN
doc/6502proc.gif
BIN
doc/6502proc.gif
Binary file not shown.
Before Width: | Height: | Size: 592 B After Width: | Height: | Size: 586 B |
105
doc/antic.htm
Normal file
105
doc/antic.htm
Normal file
@ -0,0 +1,105 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>ANTIC Documentation</TITLE>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="atari.gif">
|
||||
<CENTER>
|
||||
<H1>ANTIC Documentation</H1>
|
||||
by <A HREF="mailto:pfusik@elka.pw.edu.pl">Fox/Taquart</A><P>
|
||||
<HR>
|
||||
<P>
|
||||
<H2>Registers</H2>
|
||||
<TABLE BORDER>
|
||||
<TR><TD><I> Address </I></TD><TD><I> Read register </I></TD><TD><I> Write register </I></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^40</TT></TD><TD>unused</TD><TD><A HREF="#dmactl">DMACTL</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^41</TT></TD><TD>unused</TD><TD><A HREF="#chrctl">CHRCTL</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^42</TT></TD><TD>unused</TD><TD><A HREF="#dlptr">DLPTRL</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^43</TT></TD><TD>unused</TD><TD><A HREF="#dlptr">DLPTRH</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^44</TT></TD><TD>unused</TD><TD><A HREF="#hscrol">HSCROL</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^45</TT></TD><TD>unused</TD><TD><A HREF="#vscrol">VSCROL</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^46</TT></TD><TD>unused</TD><TD>unused</TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^47</TT></TD><TD>unused</TD><TD><A HREF="#pmbase">PMBASE</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^48</TT></TD><TD>unused</TD><TD>unused</TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^49</TT></TD><TD>unused</TD><TD><A HREF="#chbase">CHBASE</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^4A</TT></TD><TD>unused</TD><TD><A HREF="#wsync">WSYNC</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^4B</TT></TD><TD><A HREF="#vcount">VCOUNT</A></TD><TD>unused</TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^4C</TT></TD><TD><A HREF="#lpenh">LPENH</A></TD><TD>unused</TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^4D</TT></TD><TD><A HREF="#lpenv">LPENV</A></TD><TD>unused</TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^4E</TT></TD><TD>unused</TD><TD><A HREF="#nmien">NMIEN</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^4F</TT></TD><TD><A HREF="#nmist">NMIST</A></TD><TD>unused</TD></TR>
|
||||
</TABLE>
|
||||
<P>
|
||||
<HR>
|
||||
<P>
|
||||
<H2>Description</H2>
|
||||
</CENTER>
|
||||
|
||||
<A NAME="chbase"><U>CHBASE</U>
|
||||
- <B>Characters base</B><BR>
|
||||
Contains high byte of character set in text modes.<P>
|
||||
|
||||
<A NAME="chrctl"><U>CHRCTL</U>
|
||||
- <B>Characters control</B><BR>
|
||||
bit 0 - display characters 128-255 as spaces<BR>
|
||||
bit 1 - display characters 128-255 as inverse<BR>
|
||||
bit 2 - display all characters upside down<P>
|
||||
|
||||
<A NAME="dlptr"><U>DLPTRL</U> <U>DLPTRH</U>
|
||||
- <B>Display List pointer</B><P>
|
||||
|
||||
<A NAME="dmactl"><U>DMACTL</U>
|
||||
- <B>DMA control</B><BR>
|
||||
bits 1,0 - width of screen<BR>
|
||||
00 - screen off<BR>
|
||||
01 - narrow screen - 256 pixels<BR>
|
||||
10 - normal screen - 320 pixels<BR>
|
||||
11 - wide screen - 384 pixels<BR>
|
||||
bits 3,2 - DMA for Players/Missiles<BR>
|
||||
00 - no DMA for P/MG<BR>
|
||||
01 - DMA for missiles<BR>
|
||||
10 - DMA for players and missiles<BR>
|
||||
11 - DMA for players and missiles<BR>
|
||||
bit 4 - P/MG resolution<BR>
|
||||
0 - 120 lines<BR>
|
||||
1 - 240 lines<BR>
|
||||
bit 5 - DMA for Display List<BR>
|
||||
bits 7-6 - unused<P>
|
||||
|
||||
<A NAME="hscrol"><U>HSCROL</U>
|
||||
- <B>Horizontal scroll</B><P>
|
||||
|
||||
<A NAME="lpenh"><U>LPENH</U>
|
||||
- <B>Light pen horizontal position</B><P>
|
||||
|
||||
<A NAME="lpenv"><U>LPENV</U>
|
||||
- <B>Light pen vertical position</B><P>
|
||||
|
||||
<A NAME="nmien"><U>NMIEN</U>
|
||||
- <B>NMI enable</B><BR>
|
||||
bits 5-0 - unused<BR>
|
||||
bit 6 - enable VBLKI<BR>
|
||||
bit 7 - enable DLI<P>
|
||||
|
||||
<A NAME="nmist"><U>NMIST</U>
|
||||
- <B>NMI status</B><BR>
|
||||
bits 5-0 - unused<BR>
|
||||
bit 6 - VBLKI occured<BR>
|
||||
bit 7 - DLI occured<P>
|
||||
|
||||
<A NAME="pmbase"><U>PMBASE</U>
|
||||
- <B>Player/missile base</B><BR>
|
||||
High byte of P/MG data<P>
|
||||
|
||||
<A NAME="vcount"><U>VCOUNT</U>
|
||||
- <B>Vertical count</B><BR>
|
||||
Contains number of scanline divided by 2.<P>
|
||||
|
||||
<A NAME="vscrol"><U>VSCROL</U>
|
||||
- <B>Vertial scroll</B><P>
|
||||
|
||||
<A NAME="wsync"><U>WSYNC</U>
|
||||
- <B>Wait for synchronization</B><BR>
|
||||
Any value written to this register stops CPU until right border of normal screen is reached.<P>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
BIN
doc/atari.gif
Normal file
BIN
doc/atari.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 372 B |
300
doc/gtia.htm
300
doc/gtia.htm
@ -2,7 +2,7 @@
|
||||
<HEAD>
|
||||
<TITLE>GTIA Documentation</TITLE>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="6502proc.gif">
|
||||
<BODY BACKGROUND="atari.gif">
|
||||
<CENTER>
|
||||
<H1>GTIA Documentation</H1>
|
||||
by <A HREF="mailto:pfusik@elka.pw.edu.pl">Fox/Taquart</A><P>
|
||||
@ -63,9 +63,299 @@ by <A HREF="mailto:pfusik@elka.pw.edu.pl">Fox/Taquart</A><P>
|
||||
<TD ALIGN=center><TT>^1F</TT></TD><TD><A HREF="#consol">CONSOL</A></TD><TD><A HREF="#consol">CONSOL</A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P>
|
||||
<HR>
|
||||
<P>
|
||||
<P><HR><P>
|
||||
<H2>Colors</H2>
|
||||
<TABLE WIDTH=100%><TR><TD></TD>
|
||||
<TD WIDTH=6% ALIGN=center>0</TD>
|
||||
<TD WIDTH=6% ALIGN=center>1</TD>
|
||||
<TD WIDTH=6% ALIGN=center>2</TD>
|
||||
<TD WIDTH=6% ALIGN=center>3</TD>
|
||||
<TD WIDTH=6% ALIGN=center>4</TD>
|
||||
<TD WIDTH=6% ALIGN=center>5</TD>
|
||||
<TD WIDTH=6% ALIGN=center>6</TD>
|
||||
<TD WIDTH=6% ALIGN=center>7</TD>
|
||||
<TD WIDTH=6% ALIGN=center>8</TD>
|
||||
<TD WIDTH=6% ALIGN=center>9</TD>
|
||||
<TD WIDTH=6% ALIGN=center>A</TD>
|
||||
<TD WIDTH=6% ALIGN=center>B</TD>
|
||||
<TD WIDTH=6% ALIGN=center>C</TD>
|
||||
<TD WIDTH=6% ALIGN=center>D</TD>
|
||||
<TD WIDTH=6% ALIGN=center>E</TD>
|
||||
<TD WIDTH=6% ALIGN=center>F</TD>
|
||||
</TR><TR><TD ALIGN=center>0</TD>
|
||||
<TD BGCOLOR="#000000"></TD>
|
||||
<TD BGCOLOR="#101010"></TD>
|
||||
<TD BGCOLOR="#1C1C1C"></TD>
|
||||
<TD BGCOLOR="#2C2C2C"></TD>
|
||||
<TD BGCOLOR="#3C3C3C"></TD>
|
||||
<TD BGCOLOR="#4C4C4C"></TD>
|
||||
<TD BGCOLOR="#585858"></TD>
|
||||
<TD BGCOLOR="#686868"></TD>
|
||||
<TD BGCOLOR="#787878"></TD>
|
||||
<TD BGCOLOR="#888888"></TD>
|
||||
<TD BGCOLOR="#949494"></TD>
|
||||
<TD BGCOLOR="#A4A4A4"></TD>
|
||||
<TD BGCOLOR="#B4B4B4"></TD>
|
||||
<TD BGCOLOR="#C4C4C4"></TD>
|
||||
<TD BGCOLOR="#D0D0D0"></TD>
|
||||
<TD BGCOLOR="#E0E0E0"></TD>
|
||||
</TR><TR><TD ALIGN=center>1</TD>
|
||||
<TD BGCOLOR="#582000"></TD>
|
||||
<TD BGCOLOR="#642C08"></TD>
|
||||
<TD BGCOLOR="#6C3410"></TD>
|
||||
<TD BGCOLOR="#784018"></TD>
|
||||
<TD BGCOLOR="#804C24"></TD>
|
||||
<TD BGCOLOR="#8C582C"></TD>
|
||||
<TD BGCOLOR="#986034"></TD>
|
||||
<TD BGCOLOR="#A06C3C"></TD>
|
||||
<TD BGCOLOR="#AC7844"></TD>
|
||||
<TD BGCOLOR="#B4844C"></TD>
|
||||
<TD BGCOLOR="#C08C54"></TD>
|
||||
<TD BGCOLOR="#CC985C"></TD>
|
||||
<TD BGCOLOR="#D4A468"></TD>
|
||||
<TD BGCOLOR="#E0B070"></TD>
|
||||
<TD BGCOLOR="#E8B878"></TD>
|
||||
<TD BGCOLOR="#F4C480"></TD>
|
||||
</TR><TR><TD ALIGN=center>2</TD>
|
||||
<TD BGCOLOR="#540000"></TD>
|
||||
<TD BGCOLOR="#600C0C"></TD>
|
||||
<TD BGCOLOR="#6C1414"></TD>
|
||||
<TD BGCOLOR="#742020"></TD>
|
||||
<TD BGCOLOR="#802C2C"></TD>
|
||||
<TD BGCOLOR="#8C3434"></TD>
|
||||
<TD BGCOLOR="#984040"></TD>
|
||||
<TD BGCOLOR="#A44C4C"></TD>
|
||||
<TD BGCOLOR="#AC5454"></TD>
|
||||
<TD BGCOLOR="#B86060"></TD>
|
||||
<TD BGCOLOR="#C46C6C"></TD>
|
||||
<TD BGCOLOR="#D07474"></TD>
|
||||
<TD BGCOLOR="#DC8080"></TD>
|
||||
<TD BGCOLOR="#E48C8C"></TD>
|
||||
<TD BGCOLOR="#F09494"></TD>
|
||||
<TD BGCOLOR="#FCA0A0"></TD>
|
||||
</TR><TR><TD ALIGN=center>3</TD>
|
||||
<TD BGCOLOR="#580808"></TD>
|
||||
<TD BGCOLOR="#641414"></TD>
|
||||
<TD BGCOLOR="#6C1C1C"></TD>
|
||||
<TD BGCOLOR="#782828"></TD>
|
||||
<TD BGCOLOR="#843434"></TD>
|
||||
<TD BGCOLOR="#903C3C"></TD>
|
||||
<TD BGCOLOR="#984848"></TD>
|
||||
<TD BGCOLOR="#A45454"></TD>
|
||||
<TD BGCOLOR="#B05C5C"></TD>
|
||||
<TD BGCOLOR="#BC6868"></TD>
|
||||
<TD BGCOLOR="#C47474"></TD>
|
||||
<TD BGCOLOR="#D07C7C"></TD>
|
||||
<TD BGCOLOR="#DC8888"></TD>
|
||||
<TD BGCOLOR="#E89494"></TD>
|
||||
<TD BGCOLOR="#F09C9C"></TD>
|
||||
<TD BGCOLOR="#FCA8A8"></TD>
|
||||
</TR><TR><TD ALIGN=center>4</TD>
|
||||
<TD BGCOLOR="#600034"></TD>
|
||||
<TD BGCOLOR="#6C0C3C"></TD>
|
||||
<TD BGCOLOR="#741444"></TD>
|
||||
<TD BGCOLOR="#80204C"></TD>
|
||||
<TD BGCOLOR="#882C58"></TD>
|
||||
<TD BGCOLOR="#943460"></TD>
|
||||
<TD BGCOLOR="#A04068"></TD>
|
||||
<TD BGCOLOR="#A84C70"></TD>
|
||||
<TD BGCOLOR="#B45478"></TD>
|
||||
<TD BGCOLOR="#BC6080"></TD>
|
||||
<TD BGCOLOR="#C86C88"></TD>
|
||||
<TD BGCOLOR="#D47490"></TD>
|
||||
<TD BGCOLOR="#DC809C"></TD>
|
||||
<TD BGCOLOR="#E88CA4"></TD>
|
||||
<TD BGCOLOR="#F094AC"></TD>
|
||||
<TD BGCOLOR="#FCA0B4"></TD>
|
||||
</TR><TR><TD ALIGN=center>5</TD>
|
||||
<TD BGCOLOR="#500050"></TD>
|
||||
<TD BGCOLOR="#5C0C5C"></TD>
|
||||
<TD BGCOLOR="#681468"></TD>
|
||||
<TD BGCOLOR="#742074"></TD>
|
||||
<TD BGCOLOR="#7C2C7C"></TD>
|
||||
<TD BGCOLOR="#883488"></TD>
|
||||
<TD BGCOLOR="#944094"></TD>
|
||||
<TD BGCOLOR="#A04CA0"></TD>
|
||||
<TD BGCOLOR="#AC54AC"></TD>
|
||||
<TD BGCOLOR="#B860B8"></TD>
|
||||
<TD BGCOLOR="#C46CC4"></TD>
|
||||
<TD BGCOLOR="#D074D0"></TD>
|
||||
<TD BGCOLOR="#D880D8"></TD>
|
||||
<TD BGCOLOR="#E48CE4"></TD>
|
||||
<TD BGCOLOR="#F094F0"></TD>
|
||||
<TD BGCOLOR="#FCA0FC"></TD>
|
||||
</TR><TR><TD ALIGN=center>6</TD>
|
||||
<TD BGCOLOR="#340060"></TD>
|
||||
<TD BGCOLOR="#400C6C"></TD>
|
||||
<TD BGCOLOR="#4C1874"></TD>
|
||||
<TD BGCOLOR="#582480"></TD>
|
||||
<TD BGCOLOR="#603088"></TD>
|
||||
<TD BGCOLOR="#6C3C94"></TD>
|
||||
<TD BGCOLOR="#7848A0"></TD>
|
||||
<TD BGCOLOR="#8454A8"></TD>
|
||||
<TD BGCOLOR="#905CB4"></TD>
|
||||
<TD BGCOLOR="#9C68BC"></TD>
|
||||
<TD BGCOLOR="#A874C8"></TD>
|
||||
<TD BGCOLOR="#B480D4"></TD>
|
||||
<TD BGCOLOR="#BC8CDC"></TD>
|
||||
<TD BGCOLOR="#C898E8"></TD>
|
||||
<TD BGCOLOR="#D4A4F0"></TD>
|
||||
<TD BGCOLOR="#E0B0FC"></TD>
|
||||
</TR><TR><TD ALIGN=center>7</TD>
|
||||
<TD BGCOLOR="#000068"></TD>
|
||||
<TD BGCOLOR="#0C0C70"></TD>
|
||||
<TD BGCOLOR="#18187C"></TD>
|
||||
<TD BGCOLOR="#202884"></TD>
|
||||
<TD BGCOLOR="#2C3490"></TD>
|
||||
<TD BGCOLOR="#384098"></TD>
|
||||
<TD BGCOLOR="#444CA4"></TD>
|
||||
<TD BGCOLOR="#5058AC"></TD>
|
||||
<TD BGCOLOR="#5868B8"></TD>
|
||||
<TD BGCOLOR="#6474C0"></TD>
|
||||
<TD BGCOLOR="#7080CC"></TD>
|
||||
<TD BGCOLOR="#7C8CD4"></TD>
|
||||
<TD BGCOLOR="#8898E0"></TD>
|
||||
<TD BGCOLOR="#90A8E8"></TD>
|
||||
<TD BGCOLOR="#9CB4F4"></TD>
|
||||
<TD BGCOLOR="#A8C0FC"></TD>
|
||||
</TR><TR><TD ALIGN=center>8</TD>
|
||||
<TD BGCOLOR="#08205C"></TD>
|
||||
<TD BGCOLOR="#142C68"></TD>
|
||||
<TD BGCOLOR="#203870"></TD>
|
||||
<TD BGCOLOR="#28407C"></TD>
|
||||
<TD BGCOLOR="#344C88"></TD>
|
||||
<TD BGCOLOR="#405890"></TD>
|
||||
<TD BGCOLOR="#4C649C"></TD>
|
||||
<TD BGCOLOR="#5870A8"></TD>
|
||||
<TD BGCOLOR="#6078B0"></TD>
|
||||
<TD BGCOLOR="#6C84BC"></TD>
|
||||
<TD BGCOLOR="#7890C8"></TD>
|
||||
<TD BGCOLOR="#849CD0"></TD>
|
||||
<TD BGCOLOR="#90A8DC"></TD>
|
||||
<TD BGCOLOR="#98B0E8"></TD>
|
||||
<TD BGCOLOR="#A4BCF0"></TD>
|
||||
<TD BGCOLOR="#B0C8FC"></TD>
|
||||
</TR><TR><TD ALIGN=center>9</TD>
|
||||
<TD BGCOLOR="#083858"></TD>
|
||||
<TD BGCOLOR="#144464"></TD>
|
||||
<TD BGCOLOR="#20506C"></TD>
|
||||
<TD BGCOLOR="#2C5C78"></TD>
|
||||
<TD BGCOLOR="#386484"></TD>
|
||||
<TD BGCOLOR="#447090"></TD>
|
||||
<TD BGCOLOR="#507C98"></TD>
|
||||
<TD BGCOLOR="#5C88A4"></TD>
|
||||
<TD BGCOLOR="#6894B0"></TD>
|
||||
<TD BGCOLOR="#74A0BC"></TD>
|
||||
<TD BGCOLOR="#80ACC4"></TD>
|
||||
<TD BGCOLOR="#8CB8D0"></TD>
|
||||
<TD BGCOLOR="#98C0DC"></TD>
|
||||
<TD BGCOLOR="#A4CCE8"></TD>
|
||||
<TD BGCOLOR="#B0D8F0"></TD>
|
||||
<TD BGCOLOR="#BCE4FC"></TD>
|
||||
</TR><TR><TD ALIGN=center>A</TD>
|
||||
<TD BGCOLOR="#004828"></TD>
|
||||
<TD BGCOLOR="#0C5434"></TD>
|
||||
<TD BGCOLOR="#185C3C"></TD>
|
||||
<TD BGCOLOR="#246848"></TD>
|
||||
<TD BGCOLOR="#307450"></TD>
|
||||
<TD BGCOLOR="#3C7C5C"></TD>
|
||||
<TD BGCOLOR="#488868"></TD>
|
||||
<TD BGCOLOR="#549470"></TD>
|
||||
<TD BGCOLOR="#649C7C"></TD>
|
||||
<TD BGCOLOR="#70A884"></TD>
|
||||
<TD BGCOLOR="#7CB490"></TD>
|
||||
<TD BGCOLOR="#88BC9C"></TD>
|
||||
<TD BGCOLOR="#94C8A4"></TD>
|
||||
<TD BGCOLOR="#A0D4B0"></TD>
|
||||
<TD BGCOLOR="#ACDCB8"></TD>
|
||||
<TD BGCOLOR="#B8E8C4"></TD>
|
||||
</TR><TR><TD ALIGN=center>B</TD>
|
||||
<TD BGCOLOR="#005000"></TD>
|
||||
<TD BGCOLOR="#0C5C0C"></TD>
|
||||
<TD BGCOLOR="#186418"></TD>
|
||||
<TD BGCOLOR="#247024"></TD>
|
||||
<TD BGCOLOR="#307830"></TD>
|
||||
<TD BGCOLOR="#3C843C"></TD>
|
||||
<TD BGCOLOR="#489048"></TD>
|
||||
<TD BGCOLOR="#549854"></TD>
|
||||
<TD BGCOLOR="#5CA45C"></TD>
|
||||
<TD BGCOLOR="#68AC68"></TD>
|
||||
<TD BGCOLOR="#74B874"></TD>
|
||||
<TD BGCOLOR="#80C480"></TD>
|
||||
<TD BGCOLOR="#8CCC8C"></TD>
|
||||
<TD BGCOLOR="#98D898"></TD>
|
||||
<TD BGCOLOR="#A4E0A4"></TD>
|
||||
<TD BGCOLOR="#B0ECB0"></TD>
|
||||
</TR><TR><TD ALIGN=center>C</TD>
|
||||
<TD BGCOLOR="#1C4C00"></TD>
|
||||
<TD BGCOLOR="#285808"></TD>
|
||||
<TD BGCOLOR="#346010"></TD>
|
||||
<TD BGCOLOR="#406C18"></TD>
|
||||
<TD BGCOLOR="#487824"></TD>
|
||||
<TD BGCOLOR="#54842C"></TD>
|
||||
<TD BGCOLOR="#608C34"></TD>
|
||||
<TD BGCOLOR="#6C983C"></TD>
|
||||
<TD BGCOLOR="#78A444"></TD>
|
||||
<TD BGCOLOR="#84B04C"></TD>
|
||||
<TD BGCOLOR="#90B854"></TD>
|
||||
<TD BGCOLOR="#9CC45C"></TD>
|
||||
<TD BGCOLOR="#A4D068"></TD>
|
||||
<TD BGCOLOR="#B0DC70"></TD>
|
||||
<TD BGCOLOR="#BCE478"></TD>
|
||||
<TD BGCOLOR="#C8F080"></TD>
|
||||
</TR><TR><TD ALIGN=center>D</TD>
|
||||
<TD BGCOLOR="#384000"></TD>
|
||||
<TD BGCOLOR="#444C08"></TD>
|
||||
<TD BGCOLOR="#4C5814"></TD>
|
||||
<TD BGCOLOR="#58641C"></TD>
|
||||
<TD BGCOLOR="#647024"></TD>
|
||||
<TD BGCOLOR="#707C2C"></TD>
|
||||
<TD BGCOLOR="#788838"></TD>
|
||||
<TD BGCOLOR="#849440"></TD>
|
||||
<TD BGCOLOR="#909C48"></TD>
|
||||
<TD BGCOLOR="#9CA850"></TD>
|
||||
<TD BGCOLOR="#A4B45C"></TD>
|
||||
<TD BGCOLOR="#B0C064"></TD>
|
||||
<TD BGCOLOR="#BCCC6C"></TD>
|
||||
<TD BGCOLOR="#C8D874"></TD>
|
||||
<TD BGCOLOR="#D0E480"></TD>
|
||||
<TD BGCOLOR="#DCF088"></TD>
|
||||
</TR><TR><TD ALIGN=center>E</TD>
|
||||
<TD BGCOLOR="#502800"></TD>
|
||||
<TD BGCOLOR="#5C3408"></TD>
|
||||
<TD BGCOLOR="#64400C"></TD>
|
||||
<TD BGCOLOR="#705014"></TD>
|
||||
<TD BGCOLOR="#785C1C"></TD>
|
||||
<TD BGCOLOR="#846824"></TD>
|
||||
<TD BGCOLOR="#8C7428"></TD>
|
||||
<TD BGCOLOR="#988030"></TD>
|
||||
<TD BGCOLOR="#A09038"></TD>
|
||||
<TD BGCOLOR="#AC9C40"></TD>
|
||||
<TD BGCOLOR="#B4A844"></TD>
|
||||
<TD BGCOLOR="#C0B44C"></TD>
|
||||
<TD BGCOLOR="#C8C054"></TD>
|
||||
<TD BGCOLOR="#D4D05C"></TD>
|
||||
<TD BGCOLOR="#DCDC60"></TD>
|
||||
<TD BGCOLOR="#E8E868"></TD>
|
||||
</TR><TR><TD ALIGN=center>F</TD>
|
||||
<TD BGCOLOR="#541C00"></TD>
|
||||
<TD BGCOLOR="#602808"></TD>
|
||||
<TD BGCOLOR="#6C3014"></TD>
|
||||
<TD BGCOLOR="#743C1C"></TD>
|
||||
<TD BGCOLOR="#804828"></TD>
|
||||
<TD BGCOLOR="#8C5430"></TD>
|
||||
<TD BGCOLOR="#985C38"></TD>
|
||||
<TD BGCOLOR="#A46844"></TD>
|
||||
<TD BGCOLOR="#AC744C"></TD>
|
||||
<TD BGCOLOR="#B88058"></TD>
|
||||
<TD BGCOLOR="#C48860"></TD>
|
||||
<TD BGCOLOR="#D09468"></TD>
|
||||
<TD BGCOLOR="#DCA074"></TD>
|
||||
<TD BGCOLOR="#E4AC7C"></TD>
|
||||
<TD BGCOLOR="#F0B488"></TD>
|
||||
<TD BGCOLOR="#FCC090"></TD>
|
||||
</TR></TABLE>
|
||||
<P><HR><P>
|
||||
<H2>Description</H2>
|
||||
</CENTER>
|
||||
|
||||
@ -91,7 +381,7 @@ bits 7-4 - hue<P>
|
||||
- <B>Consol keys</B><BR>
|
||||
This is the only read/write register in GTIA.
|
||||
Value written is negated on read. Bits 0-2 are ANDed
|
||||
with keys status. Reset bit means key pressed.<BR>
|
||||
with state of consol keys. Reset bit means key pressed.<BR>
|
||||
bit 0 - START key<BR>
|
||||
bit 1 - SELECT key<BR>
|
||||
bit 2 - OPTION key<BR>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>X-ASM 2.2 Package Documentation</TITLE>
|
||||
<TITLE>X-ASM 2.3 Package Documentation</TITLE>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="6502proc.gif">
|
||||
<CENTER>
|
||||
<H1>X-ASM Package version 2.2</H1>
|
||||
<H1>X-ASM Package version 2.3</H1>
|
||||
by <A HREF="mailto:pfusik@elka.pw.edu.pl">Fox/Taquart</A><P>
|
||||
<HR>
|
||||
<P>
|
||||
@ -22,12 +22,18 @@ Manuals of utilities:<P>
|
||||
Atari XL/XE documentation (under construction):<P>
|
||||
<TABLE>
|
||||
<TR><TD><A HREF="gtia.htm">GTIA</A></TD><TD>GTIA chip documentation</TD></TR>
|
||||
<TR><TD><A HREF="pokey.htm">POKEY</A></TD><TD>POKEY chip documentation</TD></TR>
|
||||
<TR><TD><A HREF="pia.htm">PIA</A></TD><TD>PIA chip documentation</TD></TR>
|
||||
<TR><TD><A HREF="antic.htm">ANTIC</A></TD><TD>ANTIC chip documentation</TD></TR>
|
||||
<TR><TD><A HREF="cpubugs.asx">CPUBUGS.ASX</A></TD><TD>6502 bugs detector source</TD</TR>
|
||||
</TABLE>
|
||||
<P>
|
||||
<HR>
|
||||
<P>
|
||||
All programs are <I>freeware</I>. Copyright (c) Taquart 1999.
|
||||
Visit X-ASM Homepage:
|
||||
<A HREF="http://www.6502.org/users/fox/xasm">http://www.6502.org/users/fox/xasm</A>
|
||||
<P>
|
||||
All programs and documentation are <I>freeware</I>. Copyright (c) 1998-2000 Taquart.
|
||||
</CENTER>
|
||||
</BODY>
|
||||
</HTML>
|
74
doc/pia.htm
Normal file
74
doc/pia.htm
Normal file
@ -0,0 +1,74 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>PIA Documentation</TITLE>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="atari.gif">
|
||||
<CENTER>
|
||||
<H1>PIA Documentation</H1>
|
||||
by <A HREF="mailto:pfusik@elka.pw.edu.pl">Fox/Taquart</A><P>
|
||||
<HR>
|
||||
<P>
|
||||
<H2>Registers</H2>
|
||||
<TABLE BORDER>
|
||||
<TR><TD><I> Address </I></TD><TD><I> Read/Write register </I></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^30</TT></TD><TD><A HREF="#porta">PORTA</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^31</TT></TD><TD><A HREF="#portb">PORTB</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^32</TT></TD><TD><A HREF="#pactl">PACTL</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^33</TT></TD><TD><A HREF="#pbctl">PBCTL</A></TD></TR>
|
||||
</TABLE>
|
||||
<P>
|
||||
<HR>
|
||||
<P>
|
||||
<H2>Description</H2>
|
||||
</CENTER>
|
||||
|
||||
<A NAME="porta"><U>PORTA</U>
|
||||
- <B>Port A</B><BR>
|
||||
A bit is RESET on an event<BR>
|
||||
bit 0 - joystick 0 up<BR>
|
||||
bit 1 - joystick 0 down<BR>
|
||||
bit 2 - joystick 0 left / paddle 0 button<BR>
|
||||
bit 3 - joystick 0 right / paddle 1 button<BR>
|
||||
bit 4 - joystick 1 up<BR>
|
||||
bit 5 - joystick 1 down<BR>
|
||||
bit 6 - joystick 1 left / paddle 0 button<BR>
|
||||
bit 7 - joystick 1 right / paddle 1 button<P>
|
||||
|
||||
<A NAME="portb"><U>PORTA</U>
|
||||
- <B>Port B</B><BR>
|
||||
Controls memory.<BR>
|
||||
bit 0 - $c000-$cfff and $d800-$ffff:<BR>
|
||||
0 - RAM<BR>
|
||||
1 - OS ROM<BR>
|
||||
bit 1 - $a000-$bfff:<BR>
|
||||
0 - BASIC ROM<BR>
|
||||
1 - RAM<BR>
|
||||
bits 6-2 - extended memory control<BR>
|
||||
bit 7 - $5800-$5fff:<BR>
|
||||
0 - SELF TEST ROM<BR>
|
||||
1 - RAM<P>
|
||||
|
||||
<A NAME="pactl"><U>PACTL</U>
|
||||
- <B>Port A Control</B><BR>
|
||||
bits 1-0 - interrupts control (?) = 00<BR>
|
||||
bit 2 - PORTA control<BR>
|
||||
0 - input/output configuration<BR>
|
||||
1 - data register<BR>
|
||||
bit 3 - cassette motor<BR>
|
||||
0 - on<BR>
|
||||
1 - off<BR>
|
||||
bits 7-4 - interrupts status (?) = 0011<P>
|
||||
|
||||
<A NAME="pbctl"><U>PBCTL</U>
|
||||
- <B>Port B Control</B><BR>
|
||||
bits 1-0 - interrupts control (?) = 00<BR>
|
||||
bit 2 - PORTB control<BR>
|
||||
0 - input/output configuration<BR>
|
||||
1 - data register<BR>
|
||||
bit 3 - serial devices command line<BR>
|
||||
0 - on<BR>
|
||||
1 - off<BR>
|
||||
bits 7-4 - interrupts status (?) = 0011<P>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
164
doc/pokey.htm
Normal file
164
doc/pokey.htm
Normal file
@ -0,0 +1,164 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>POKEY Documentation</TITLE>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="atari.gif">
|
||||
<CENTER>
|
||||
<H1>POKEY Documentation</H1>
|
||||
by <A HREF="mailto:pfusik@elka.pw.edu.pl">Fox/Taquart</A><P>
|
||||
<HR>
|
||||
<P>
|
||||
<H2>Registers</H2>
|
||||
<TABLE BORDER>
|
||||
<TR><TD><I> Address </I></TD><TD><I> Read register </I></TD><TD><I> Write register </I></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^20</TT></TD><TD><A HREF="#potx">POT0</A></TD><TD><A HREF="#audfx">AUDF1</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^21</TT></TD><TD><A HREF="#potx">POT1</A></TD><TD><A HREF="#audcx">AUDC1</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^22</TT></TD><TD><A HREF="#potx">POT2</A></TD><TD><A HREF="#audfx">AUDF2</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^23</TT></TD><TD><A HREF="#potx">POT3</A></TD><TD><A HREF="#audcx">AUDC2</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^24</TT></TD><TD>unused</TD><TD><A HREF="#audfx">AUDF3</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^25</TT></TD><TD>unused</TD><TD><A HREF="#audcx">AUDC3</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^26</TT></TD><TD>unused</TD><TD><A HREF="#audfx">AUDF4</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^27</TT></TD><TD>unused</TD><TD><A HREF="#audcx">AUDC4</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^28</TT></TD><TD><A HREF="#potst">POTST</A></TD><TD><A HREF="#audctl">AUDCTL</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^29</TT></TD><TD><A HREF="#kbcode">KBCODE</A></TD><TD><A HREF="#stimer">STIMER</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^2A</TT></TD><TD><A HREF="#random">RANDOM</A></TD><TD><A HREF="#skstres">SKSTRES</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^2B</TT></TD><TD>unused</TD><TD><A HREF="#potgo">POTGO</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^2C</TT></TD><TD>unused</TD><TD>unused</TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^2D</TT></TD><TD><A HREF="#serin">SERIN</A></TD><TD><A HREF="#serout">SEROUT</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^2E</TT></TD><TD><A HREF="#irqst">IRQST</A></TD><TD><A HREF="#irqen">IRQEN</A></TD></TR>
|
||||
<TR><TD ALIGN=center><TT>^2F</TT></TD><TD><A HREF="#skstat">SKSTAT</A></TD><TD><A HREF="#skctl">SKCTL</A></TD></TR>
|
||||
</TABLE>
|
||||
<P>
|
||||
<HR>
|
||||
<P>
|
||||
<H2>Description</H2>
|
||||
</CENTER>
|
||||
|
||||
<A NAME="audcx"><U>AUDC1</U> <U>AUDC2</U> <U>AUDC3</U> <U>AUDC4</U>
|
||||
- <B>Audio control</B><BR>
|
||||
bits 3-0 - volume control<BR>
|
||||
bit 4 - channel control<BR>
|
||||
0 - synthetize sound<BR>
|
||||
1 - constant level<BR>
|
||||
bits 7-5 - sound distortion<BR>
|
||||
000 - with 5-bit and 17-bit registers<BR>
|
||||
001 - with 5-bit register<BR>
|
||||
010 - with 5-bit and 4-bit registers<BR>
|
||||
011 - with 5-bit register<BR>
|
||||
100 - with 17-bit register<BR>
|
||||
101 - clear sound<BR>
|
||||
110 - with 4-bit register<BR>
|
||||
111 - clear sound<P>
|
||||
|
||||
<A NAME="audctl"><U>AUDCTL</U>
|
||||
- <B>Audio control</B><BR>
|
||||
bit 0 - base clock for all channels<BR>
|
||||
0 - 64 kHz<BR>
|
||||
1 - 15 kHz<BR>
|
||||
bit 1 - channel 2 filter controlled by channel 4<BR>
|
||||
bit 2 - channel 1 filter controlled by channel 3<BR>
|
||||
bit 3 - join counters 3 and 4 into 16-bit channel<BR>
|
||||
bit 4 - join counters 1 and 2 into 16-bit channel<BR>
|
||||
bit 5 - base clock for channel 3<BR>
|
||||
0 - according to bit 0<BR>
|
||||
1 - 1.77 MHz (PAL), 1.79 MHz (NTSC)<BR>
|
||||
bit 6 - base clock for channel 1<BR>
|
||||
0 - according to bit 0<BR>
|
||||
1 - 1.77 MHz (PAL), 1.79 MHz (NTSC)<BR>
|
||||
bit 7 - distortion register<BR>
|
||||
0 - 17-bit<BR>
|
||||
1 - 9-bit<P>
|
||||
|
||||
<A NAME="audfx"><U>AUDF1</U> <U>AUDF2</U> <U>AUDF3</U> <U>AUDF4</U>
|
||||
- <B>Audio frequency</B><P>
|
||||
|
||||
<A NAME="irqen"><U>IRQEN</U>
|
||||
- <B>IRQ enable</B><BR>
|
||||
1 - enable<BR>
|
||||
bit 0 - timer 1<BR>
|
||||
bit 1 - timer 2<BR>
|
||||
bit 2 - timer 4<BR>
|
||||
bit 3 - end of transmission<BR>
|
||||
bit 4 - serial output<BR>
|
||||
bit 5 - serial input<BR>
|
||||
bit 6 - keyboard<BR>
|
||||
bit 7 - BREAK key<P>
|
||||
|
||||
<A NAME="irqst"><U>IRQST</U>
|
||||
- <B>IRQ status</B><BR>
|
||||
0 - requested<BR>
|
||||
bit 0 - timer 1<BR>
|
||||
bit 1 - timer 2<BR>
|
||||
bit 2 - timer 4<BR>
|
||||
bit 3 - end of transmission<BR>
|
||||
bit 4 - serial output<BR>
|
||||
bit 5 - serial input<BR>
|
||||
bit 6 - keyboard<BR>
|
||||
bit 7 - BREAK key<P>
|
||||
|
||||
<A NAME="kbcode"><U>KBCODE</U>
|
||||
- <B>Keyboard code</B><P>
|
||||
|
||||
<A NAME="potx"><U>POT0</U> <U>POT1</U> <U>POT2</U> <U>POT3</U>
|
||||
- <B>Potentiometrs</B><BR>
|
||||
Position of potentiometr in range 0-224<P>
|
||||
|
||||
<A NAME="potgo"><U>POTGO</U>
|
||||
- <B>Potentiometr goes</B><BR>
|
||||
Any value written to this registers starts measurement of potentiometrs<P>
|
||||
|
||||
<A NAME="potst"><U>POTST</U>
|
||||
- <B>Potentiometrs status</B><BR>
|
||||
0 means POTx contains proper value<BR>
|
||||
1 means POTx is being measured<BR>
|
||||
bit 0 - POT0<BR>
|
||||
bit 1 - POT1<BR>
|
||||
bit 2 - POT2<BR>
|
||||
bit 3 - POT3<BR>
|
||||
bits 7-4 - not used<P>
|
||||
|
||||
<A NAME="random"><U>RANDOM</U>
|
||||
- <B>Random</B><P>
|
||||
|
||||
<A NAME="serin"><U>SERIN</U>
|
||||
- <B>Serial input</B><BR>
|
||||
Received byte<P>
|
||||
|
||||
<A NAME="serout"><U>SEROUT</U>
|
||||
- <B>Serial output</B><BR>
|
||||
A byte to be send<P>
|
||||
|
||||
<A NAME="skctl"><U>SKCTL</U>
|
||||
- <B>Serial and keyboard control</B><BR>
|
||||
bits 1,0 - POKEY control<BR>
|
||||
00 - reset POKEY<BR>
|
||||
11 - normal state<BR>
|
||||
bit 2 - speed of A/D conversion<BR>
|
||||
bit 3 - two-tone transmission<BR>
|
||||
bits 6-4 - transmission speed control<BR>
|
||||
bit 7 - force SPACE signal<P>
|
||||
|
||||
<A NAME="skstat"><U>SKSTAT</U>
|
||||
- <B>Serial and keyboard status</B><BR>
|
||||
bit 0 - unused (=0)<BR>
|
||||
bit 1 - transmission<BR>
|
||||
0 - in progress<BR>
|
||||
bit 2 - keyboard status<BR>
|
||||
0 - a key pressed<BR>
|
||||
bit 3 - SHIFT key status<BR>
|
||||
0 - pressed<BR>
|
||||
bit 4 - serial input line state<BR>
|
||||
bit 5 - keyboard buffer overflow<BR>
|
||||
bit 6 - serial input buffer overflow<BR>
|
||||
bit 7 - Framing Error occured<P>
|
||||
|
||||
<A NAME="skstres"><U>SKSTRES</U>
|
||||
- <B>SKSTAT reset</B><BR>
|
||||
Any value written to this register resets SKSTAT error flags<P>
|
||||
|
||||
<A NAME="stimer"><U>STIMER</U>
|
||||
- <B>Start timers</B><BR>
|
||||
Any value written to this register resets all counters<P>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
509
doc/xasm.htm
509
doc/xasm.htm
@ -1,25 +1,61 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>X-Assembler 2.2 Manual</TITLE>
|
||||
</HEAD>
|
||||
<HTML><HEAD><TITLE>X-Assembler 2.3 Manual</TITLE></HEAD>
|
||||
<BODY BACKGROUND="6502proc.gif">
|
||||
<CENTER>
|
||||
<H1>X-Assembler version 2.2</H1>
|
||||
<H1>X-Assembler version 2.3</H1>
|
||||
by <A HREF="mailto:pfusik@elka.pw.edu.pl">Fox/Taquart</A><P>
|
||||
</CENTER>
|
||||
|
||||
<HR></P><A NAME="intro">
|
||||
<H2>INTRODUCTION
|
||||
<A HREF="#usage">USAGE</A>
|
||||
<A HREF="#syntax">SYNTAX</A>
|
||||
<A HREF="#faq">FAQ</A>
|
||||
<A HREF="index.htm">BACK</A>
|
||||
</H2>
|
||||
The X-Assembler is an cross-assembler, which generates code for the 6502 processor.
|
||||
It is 99% compatible with Quick Assembler on 8-bit Atari.
|
||||
<BR>
|
||||
<H3>CHANGES</H3>
|
||||
<H4>Version 2.2</H4>
|
||||
<HR>
|
||||
<H2>TABLE OF CONTENTS</H2>
|
||||
<TABLE><TR><TD>
|
||||
<UL><LI><A HREF="#intro">INTRODUCTION</A>
|
||||
<UL><LI><A HREF="#changes">Changes</A>
|
||||
<UL><LI><A HREF="#ver23">Version 2.3</A>
|
||||
<LI><A HREF="#ver22">Version 2.2</A>
|
||||
<LI><A HREF="#ver20">Version 2.0</A>
|
||||
<LI><A HREF="#ver12">Version 1.2</A>
|
||||
</UL></UL><LI><A HREF="#usage">USAGE</A>
|
||||
<UL><LI><A HREF="#sysreq">System requirements</A>
|
||||
<LI><A HREF="#srcreq">Source code requirements</A>
|
||||
<LI><A HREF="#convqa">Converting Quick Assembler files</A>
|
||||
<LI><A HREF="#asm">Assembling a source program</A>
|
||||
<LI><A HREF="#opts">Assembling options</A>
|
||||
<LI><A HREF="#exitcod">Exit codes</A>
|
||||
<LI><A HREF="#listing">Listing structure</A>
|
||||
<LI><A HREF="#labtab">Label table structure</A>
|
||||
</UL>
|
||||
</TD><TD><UL><LI><A HREF="#syntax">SYNTAX</A>
|
||||
<UL><LI><A HREF="#fields">Fields</A>
|
||||
<UL><LI><A HREF="#label">Label field</A>
|
||||
<LI><A HREF="#repeat">Repeat count</A>
|
||||
<LI><A HREF="#instr">Instruction field</A>
|
||||
<LI><A HREF="#operand">Operand field</A>
|
||||
<LI><A HREF="#comment">Comment</A>
|
||||
</UL><LI><A HREF="#expr">Expressions</A>
|
||||
<UL><LI><A HREF="#numbers">Numbers</A>
|
||||
<LI><A HREF="#operators">Operators</A>
|
||||
</UL><LI><A HREF="#directives">Directives</A>
|
||||
<LI><A HREF="#pseudocom">Pseudo-commands</A>
|
||||
<LI><A HREF="#adrmod">Addressing modes</A>
|
||||
</UL><LI><A HREF="#faq">FAQ</A>
|
||||
</UL>
|
||||
</TD></TR></TABLE></CENTER>
|
||||
<P><HR>
|
||||
<A NAME="intro"><H2>INTRODUCTION</H2>
|
||||
The X-Assembler is a cross-assembler generating code for the 6502 processor.
|
||||
It has been designed to be easy to use for Quick Assembler programmers,
|
||||
therefore its syntax is an extension of QA's one.<BR>
|
||||
<A NAME="changes"><H3>Changes</H3>
|
||||
<A NAME="ver23"><H4>Version 2.3</H4>
|
||||
<UL>
|
||||
<LI> double skip (e.g. <TT>SCC:SNE</TT>) bug fixed
|
||||
<LI> real number two-digit exponent bug fixed
|
||||
<LI> truncating line trailing spaces in listing
|
||||
<LI> <A HREF="#new_labdef">label definitions allowed in blank,
|
||||
comment and repeated lines</A>
|
||||
<LI> <A HREF="#new_unary">unary operators</A>
|
||||
<LI> <A HREF="#new_dta"><TT>DTA</TT> implied byte mode</A>
|
||||
<LI> <A HREF="#new_op_op">operand can be skipped for some op-codes</A>
|
||||
</UL>
|
||||
<A NAME="ver22"><H4>Version 2.2</H4>
|
||||
<UL>
|
||||
<LI> invalid absolute <TT>CPX</TT> and <TT>CPY</TT> op-codes bug fixed
|
||||
<LI> branch addressing mode not checking bug fixed
|
||||
@ -40,7 +76,7 @@ assembling only if source newer than object option</A>
|
||||
<LI> <A HREF="#new_adrmodes">
|
||||
<TT>(),0+</TT> and <TT>(),0-</TT> pseudo addressing modes</A>
|
||||
</UL>
|
||||
<H4>Version 2.0</H4>
|
||||
<A NAME="ver20"><H4>Version 2.0</H4>
|
||||
<UL>
|
||||
<LI> truncating name of object bug fixed
|
||||
<LI> <TT>EQU</TT> and <TT>DTA</TT> forward reference bugs fixed
|
||||
@ -61,67 +97,64 @@ assembling only if source newer than object option</A>
|
||||
<LI> Atari floating-point numbers generation
|
||||
<LI> improved <TT>INS</TT>: inserting specified part of file
|
||||
</UL>
|
||||
<H4>Version 1.2</H4>
|
||||
<A NAME="ver12"><H4>Version 1.2</H4>
|
||||
<UL>
|
||||
<LI> first release
|
||||
</UL>
|
||||
|
||||
<HR></P><A NAME="usage">
|
||||
<H2><A HREF="#intro">INTRODUCTION</A>
|
||||
USAGE
|
||||
<A HREF="#syntax">SYNTAX</A>
|
||||
<A HREF="#faq">FAQ</A>
|
||||
<A HREF="index.htm">BACK</A>
|
||||
</H2>
|
||||
|
||||
<H3>System requirements</H3>
|
||||
<HR>
|
||||
<A NAME="usage"><H2>USAGE</H2>
|
||||
<A NAME="sysreq"><H3>System requirements</H3>
|
||||
<UL>
|
||||
<LI> a PC compatible computer with 386 or better CPU
|
||||
(a numeric coprocessor is required for generating sinus tables)
|
||||
<LI> a MS-DOS compatible OS
|
||||
<LI> a numeric coprocessor for generating sinus tables.
|
||||
Your CPU probably has a built-in coprocessor.
|
||||
</UL>
|
||||
<H3>Creating a source program</H3>
|
||||
Source file should be plain ASCII file. Although different EOLs are supported,
|
||||
you would probably prefer CR/LF EOLs because of text editor.<BR>
|
||||
Single line of source should not be longer than 256 characters.
|
||||
There is no limitation on the length of the file.<BR>
|
||||
Source may contain tabulators, which are treated as spaces.<BR>
|
||||
Assembler is not case-sensitive.
|
||||
<BR>
|
||||
<H3>Converting Quick Assembler files</H3>
|
||||
You must convert Atari text file into PC text file (EOL's from $9b to $0d/$0a),
|
||||
ATASCII 0-31 and 128-255 characters should be replaced with standard ASCII
|
||||
characters, using QAsm expressions.<BR>
|
||||
You also have to change all <TT>OPT</TT> directives,
|
||||
but usually you needn't them at all.
|
||||
<BR>
|
||||
<H3>Assembling a source program</H3>
|
||||
You run assembler from DOS prompt with following syntax:<BR>
|
||||
<A NAME="srcreq"><H3>Source code requirements</H3>
|
||||
<UL>
|
||||
<LI> Source file should be plain ASCII file.
|
||||
Although different EOLs are supported,
|
||||
CR/LF is recommended because it is standard for text files on PC.
|
||||
<LI> No line of source can be longer than 256 characters.
|
||||
<LI> There is no limitation on the length of the source.
|
||||
<LI> Tabulators can be used in place of spaces.
|
||||
<LI> The assembler is not case-sensitive.
|
||||
</UL>
|
||||
<A NAME="convqa"><H3>Converting Quick Assembler files</H3>
|
||||
Because of possible editor-associated problems you had better convert
|
||||
an Atari text file to a regular PC text file, i.e. EOLs from $9b to $0d/$0a
|
||||
and ATASCII specific characters to their integer representation.<BR>
|
||||
You have to change all <TT>OPT</TT> directives,
|
||||
but usually you only need to remove them.<BR>
|
||||
<A NAME="asm"><H3>Assembling a source program</H3>
|
||||
The common syntax of invoking command line is following:<BR>
|
||||
<PRE>XASM source [options]
|
||||
</PRE><TT>source</TT> is name of source file.
|
||||
If no extension given, the .ASX is added by default.<P>
|
||||
Optional options are:
|
||||
</PRE><TT>source</TT> is the name of source file.
|
||||
If no extension is given, the .ASX is implied.<P>
|
||||
Default action on invoking without options is to compile
|
||||
writing to a file with the .OBX extension.<P>
|
||||
<A NAME="opts"><H3>Assembling options</H3>
|
||||
Following options are supported:
|
||||
<DL>
|
||||
<DT><TT>/c</TT>
|
||||
<DD>Enable listing false conditionals.<BR>
|
||||
By default lines skipped because of false condition are not listed.<P>
|
||||
By default lines skipped due to false condition are not listed.<P>
|
||||
<A NAME="new_environment">
|
||||
<DT><TT>/e</TT>
|
||||
<DD>Enable setting environment variables when error occurs.<BR>
|
||||
With this option, X-Asm sets two environment variables: ERRFILE and ERRLINE.
|
||||
They may be used in a batch file to locate error and set editor on it.
|
||||
For example, in my batch file I use such construction:
|
||||
<DD>Enable setting environment variables pointing to the error location.<BR>
|
||||
With this option, X-Asm sets two environment variables:
|
||||
ERRFILE and ERRLINE.
|
||||
They may be used in a batch file to locate error and set editor's
|
||||
insertion point on it. For example, in my batch file I use such a construction:
|
||||
<PRE>XASM %1 /e
|
||||
IF NOT ERRORLEVEL 1 GOTO ok
|
||||
NCE +%ERRLINE% %ERRFILE%
|
||||
</PRE>
|
||||
NCE stands for Norton Classic Editor.<P>
|
||||
If there was no error, variables point at last warning.
|
||||
If there was no error, variables point at last issued warning.
|
||||
If no warning occured, they are removed from the environment.<P>
|
||||
<DT><TT>/i</TT>
|
||||
<DD>Disable listing included source.<BR>
|
||||
Only main source file will be listed.<P>
|
||||
<DD>Disable listing included source. Only main source file will be listed.<P>
|
||||
<DT><TT>/l[:fname]</TT>
|
||||
<DD>Enable generating listing.
|
||||
If no <TT>fname</TT> given, listing is written to <TT>source.lst.</TT><P>
|
||||
@ -138,23 +171,22 @@ Using tabs makes listing file shorter.<BR>
|
||||
Tab stops are assumed to be every 8 characters.<P>
|
||||
<DT><TT>/t[:fname]</TT>
|
||||
<DD>List label table.
|
||||
If no <TT>fname</TT> given, table is written at the end of listing.<P>
|
||||
If no <TT>fname</TT> given, table is written at the end of listing or to
|
||||
<TT>source.tab</TT>.<P>
|
||||
</DL>
|
||||
|
||||
If source is incorrect, X-Asm stops on first encountered error.<P>
|
||||
|
||||
Errorlevels returned by X-Asm:<BR>
|
||||
<A NAME="exitcod"><H3>Exit codes</H3>
|
||||
Meaning of exit codes returned by X-Asm:<BR>
|
||||
3 = bad parameters, assembling not started<BR>
|
||||
2 = error occured<BR>
|
||||
1 = warning(s) only<BR>
|
||||
0 = no errors, no warnings<BR>
|
||||
|
||||
<H3>Listing structure</H3>
|
||||
<A NAME="listing"><H3>Listing structure</H3>
|
||||
Line of listing includes:
|
||||
<UL>
|
||||
<LI> decimal number of line of source file (if source is different than in
|
||||
previous listed line, appropriate message line is generated)
|
||||
<LI> hexadecimal origin
|
||||
previous listed line, appropriate message line is issued)
|
||||
<LI> hexadecimal origin value
|
||||
<LI> hexadecimal bytes written to object file<BR>
|
||||
Listed are also generated headers. A <TT>xxxx-yyyy></TT> in place of origin
|
||||
represents generated header: <TT>$xxxx</TT> is the first and <TT>$yyyy</TT>
|
||||
@ -164,46 +196,120 @@ A plus sign placed after hex numbers stands for more bytes written to object
|
||||
in this line, not listed through lack of space.
|
||||
<LI> remaining part of listing line is a copy of source line
|
||||
</UL>
|
||||
|
||||
<H3>Label table structure</H3>
|
||||
<A NAME="labtab"><H3>Label table structure</H3>
|
||||
Line of label table includes:
|
||||
<UL>
|
||||
<LI> some label attributes:<BR>
|
||||
<TT>n</TT> - label defined but not used elsewhere<BR>
|
||||
<TT>2</TT> - label value known in pass 2 only (label definition uses forward
|
||||
reference and thus you can't do forward references to that label)
|
||||
reference and thus you can't make forward references to that label)
|
||||
<LI> hexadecimal value of the label
|
||||
<LI> name of the label
|
||||
</UL>
|
||||
|
||||
<HR></P><A NAME="syntax">
|
||||
<H2><A HREF="#intro">INTRODUCTION</A>
|
||||
<A HREF="#usage">USAGE</A>
|
||||
SYNTAX
|
||||
<A HREF="#faq">FAQ</A>
|
||||
<A HREF="index.htm">BACK</A>
|
||||
</H2>
|
||||
Lines of source code may be:
|
||||
<UL>
|
||||
<LI> empty lines - ignored, of course
|
||||
<LI> comments - ignored, too
|
||||
<LI> statements - not ignored :-)
|
||||
</UL>
|
||||
Comment lines must have one of the following characters in the FIRST column
|
||||
of the line: <TT>* ; |</TT>
|
||||
<HR>
|
||||
<A NAME="syntax"><H2>SYNTAX</H2>
|
||||
|
||||
</P><A NAME="expressions">
|
||||
<H3>Expressions <A HREF="#statements">Statements</A></H3>
|
||||
<A NAME="fields"><H3>Fields</H3>
|
||||
Source code is line-oriented. Every line of source consists of <I>fields</I>.
|
||||
Same sequence of characters used in different fields has completely different meaning.
|
||||
Fields are separated with one or more blank characters.
|
||||
There can't be any space within a field excluding strings and comments.<P>
|
||||
There are following types of fields:
|
||||
<UL>
|
||||
<LI> <A HREF="#label">label field</A>
|
||||
<LI> <A HREF="#repeat">repeat count</A>
|
||||
<LI> <A HREF="#instr">instruction field</A>
|
||||
<LI> <A HREF="#operand">operand</A>
|
||||
<LI> <A HREF="#comment">comment</A>
|
||||
</UL>
|
||||
<A NAME="new_labdef">Every line of source must match one of two general forms:
|
||||
<UL>
|
||||
<LI> <TT>LABEL *COMMENT</TT>
|
||||
<LI> <TT>LABEL :COUNT CMD:CMD OP1 OP2 COMMENT</TT>
|
||||
</UL>
|
||||
In the first form, both fields are optional. Blank lines are ignored of course.
|
||||
Comment must here start with one of these characters: <TT>; |</TT> or <TT>*</TT>
|
||||
(semicolon, pipe or asterisk). Any information in the line following
|
||||
such character is ignored.<P>
|
||||
In the latter form, you must use a minimum of an instruction field.
|
||||
It depends on the instruction, how many operands it takes.
|
||||
Every instruction takes constant number of operands, therefore
|
||||
there's no need to use a special character at the start of a comment, because after
|
||||
succesfully taking operands, X-Asm discards the remaining part of line.<P>
|
||||
|
||||
<A NAME="label"><H4>Label field</H4>
|
||||
This field is optional. It must start at first character in line, without
|
||||
any blank characters before. The purpose of using label field is to define a label.<BR>
|
||||
Label is a symbol representing an integer of range -$ffff..$ffff.<BR>
|
||||
Name of a label can contain letters, digits and underscores (<TT>_</TT>).
|
||||
Digit can not be label's first character.
|
||||
Name of a label can be as long as you want and all the characters
|
||||
are meaningful. In Quick Assembler only 6 leading characters were recognized
|
||||
and some sources may not compile under X-Asm for this reason.<BR>
|
||||
Defining a label without using <TT>EQU</TT> makes it equal to current value
|
||||
of the origin counter.<BR>
|
||||
Label can't be redefined.<P>
|
||||
|
||||
<A NAME="new_linerep"><A NAME="repeat"><H4>Repeat count</H4>
|
||||
Repeating means assembling single line several times as if
|
||||
there were several identical lines. Note it is not just duplicating
|
||||
bytes written to object.<BR>
|
||||
Repeat count, which can be any valid expression, has to be preceded
|
||||
with a colon.<BR>
|
||||
Examples:
|
||||
<PRE>:4 asl @
|
||||
:2 dta a(*)
|
||||
</PRE>
|
||||
In the latter example each <TT>DTA</TT> has different operand value.<BR>
|
||||
If repeat count equals zero, remaining part of line is not assembled.
|
||||
This allows conditional assembly on single line to be more compact.
|
||||
|
||||
<A NAME="new_pairing"><A NAME="instr"><H4>Instruction field</H4>
|
||||
If this is the first field in a line, the line must start with at least
|
||||
one blank character. Instruction field consists of one or two instructions.
|
||||
The latter case is called instructions pairing, because a pair
|
||||
of instructions have shared operand. You separate instructions
|
||||
with a colon.<BR>
|
||||
Example:
|
||||
<PRE> adc:sta $80
|
||||
</PRE>is equivalent to
|
||||
<PRE> adc $80
|
||||
sta $80
|
||||
</PRE>
|
||||
Note that
|
||||
<PRE> lda:tax $80
|
||||
</PRE>is correct, because <TT>$80</TT> is a comment for <TT>TAX</TT>.<P>
|
||||
Single instruction always consists of 3 letters. It can be:
|
||||
<OL TYPE=a>
|
||||
<LI> 6502 command - standard mnemonics are used
|
||||
<LI> <A HREF="#directives">directive
|
||||
<LI> <A HREF="#pseudocom">pseudo-command
|
||||
</OL>
|
||||
|
||||
<A NAME="operand"><H4>Operand field</H4>
|
||||
Some instructions don't need any operand,
|
||||
other need two operands.<BR>
|
||||
6502 commands require operand with proper
|
||||
<A HREF="#adrmod">addressing mode</A>.<P>
|
||||
|
||||
<A NAME="comment"><H4>Comment</H4>
|
||||
Comment in a statement does not start from any special character
|
||||
like <TT>;</TT> for example. Comment field is implied when appropriate
|
||||
number of operands was taken.<P>
|
||||
|
||||
<P><HR><P>
|
||||
<A NAME="expr"><H3>Expressions</H3>
|
||||
Expressions are numbers combined with operators and brackets.
|
||||
You should use square brackets, because parentheses are reserved
|
||||
for 6502 indirect addressing.
|
||||
|
||||
<H4>Numbers</H4>
|
||||
<A NAME="numbers"><H4>Numbers</H4>
|
||||
Numbers are 32-bit signed integers, in the range of -$7fffffff..$7fffffff.
|
||||
A number can be:
|
||||
<TABLE>
|
||||
<TR><TD WIDTH=300><UL><LI> a decimal number</TD><TD><TT>-12345</TT></TD></TR>
|
||||
<TR><TD><UL><LI> a hexadedecimal number</TD><TD><TT>$abcd</TT></TD></TR>
|
||||
<TR><TD><UL><LI> a hexadecimal number</TD><TD><TT>$abcd</TT></TD></TR>
|
||||
<TR><TD><UL><LI> a binary number</TD><TD><TT>%10100101</TT></TD></TR>
|
||||
<TR><TD><UL><LI> an ASCII character</TD><TD><TT>'a'</TT> or <TT>"a"</TT></TD></TR>
|
||||
<TR><TD><UL><LI> an origin counter</TD><TD><TT>*</TT></TD></TR>
|
||||
@ -226,13 +332,16 @@ where x is a hexadecimal digit.
|
||||
Byte op-code of instruction inside braces. Operand is discarded
|
||||
and is necessary only for identifying addressing mode.
|
||||
Instruction should begin right after left brace and right brace should
|
||||
immediately follow the operand or the command in implied addressing mode.
|
||||
immediately follow the operand or the command in implied addressing mode.<BR>
|
||||
<A NAME="new_op_op">You can skip the operand, if the addressing mode is fixed.
|
||||
Examples:<BR>
|
||||
<TT>{lda #}</TT>, <TT>{jsr}</TT>, <TT>{bne}</TT>, <TT>{jmp ()}</TT>,
|
||||
<TT>{sta a:,x}</TT>.
|
||||
</DIV>
|
||||
<P>
|
||||
|
||||
<H4>Operators</H4>
|
||||
Currently there are 19 operators:<P>
|
||||
|
||||
<A NAME="operators"><H4>Operators</H4>
|
||||
<I>Binary operators:</I><P>
|
||||
<TABLE>
|
||||
<TR><TD><TT>+ </TT></TD><TD>Addition</TD></TR>
|
||||
<TR><TD><TT>- </TT></TD><TD>Subtraction</TD></TR>
|
||||
@ -253,90 +362,39 @@ Currently there are 19 operators:<P>
|
||||
<TR><TD><TT>>= </TT></TD><TD>Greater or equal</TD></TR>
|
||||
<TR><TD><TT>&& </TT></TD><TD>Logical and</TD></TR>
|
||||
<TR><TD><TT>|| </TT></TD><TD>Logical or</TD></TR>
|
||||
</TABLE>
|
||||
<P>
|
||||
Operator precedence:
|
||||
</TABLE><P>
|
||||
<A NAME="new_unary">
|
||||
<I>Unary operators:</I><P>
|
||||
<TABLE>
|
||||
<TR><TD>first</TD><TD><TT>[]</TT></TD></TR>
|
||||
<TR><TD> </TD><TD><TT>* / % & << >></TT></TD></TR>
|
||||
<TR><TD> </TD><TD><TT>+ - | ^</TT></TD></TR>
|
||||
<TR><TD> </TD><TD><TT>= <> != < > <= >=</TT></TD></TR>
|
||||
<TR><TD> </TD><TD><TT>&&</TT></TD></TR>
|
||||
<TR><TD>last </TD><TD><TT>||</TT></TD></TR>
|
||||
</TABLE>
|
||||
<P>
|
||||
<TR><TD><TT>+</TT></TD><TD>Plus (does nothing)</TD></TR>
|
||||
<TR><TD><TT>-</TT></TD><TD>Minus (changes sign)</TD></TR>
|
||||
<TR><TD><TT>~</TT></TD><TD>Bitwise not (complements all bits)</TD></TR>
|
||||
<TR><TD><TT>!</TT></TD><TD>Logical not (changes true to false and vice versa)</TD></TR>
|
||||
<TR><TD><TT><</TT></TD><TD>Low (extracts low byte)</TD></TR>
|
||||
<TR><TD><TT>></TT></TD><TD>High (extracts high byte)</TD></TR>
|
||||
</TABLE><P>
|
||||
<I>Operator precedence:</I><P>
|
||||
<TABLE>
|
||||
<TR><TD>first</TD><TD><TT>[]</TT><TD>(brackets)</TD></TR>
|
||||
<TR><TD> </TD><TD><TT>+ - ~ < ></TT><TD>(unary)</TD></TR>
|
||||
<TR><TD> </TD><TD><TT>* / % & << >></TT><TD>(binary)</TD></TR>
|
||||
<TR><TD> </TD><TD><TT>+ - | ^</TT><TD>(binary)</TD></TR>
|
||||
<TR><TD> </TD><TD><TT>= <> != < > <= >=</TT><TD>(binary)</TD></TR>
|
||||
<TR><TD> </TD><TD><TT>!</TT><TD>(unary)</TD></TR>
|
||||
<TR><TD> </TD><TD><TT>&&</TT><TD>(binary)</TD></TR>
|
||||
<TR><TD>last </TD><TD><TT>||</TT><TD>(binary)</TD></TR>
|
||||
</TABLE><P>
|
||||
Operators are similar to used in C language, but their priorities are different
|
||||
than in C.<P>
|
||||
Compare and logical operators assume that zero is false and non-zero is true.
|
||||
They return 1 for true.<P>
|
||||
When calculating expression, 32-bit arithmetic is used. When range of 32 bits
|
||||
While calculating expression, signed 32-bit arithmetic is used. When range of 32 bits
|
||||
is exceeded, <TT>'Arithmetic overflow'</TT> error is generated.<P>
|
||||
|
||||
</P><A NAME="statements">
|
||||
<H3><A HREF="#expressions">Expressions</A> Statements</H3>
|
||||
A statement is divided into fields:
|
||||
<UL>
|
||||
<LI> <A HREF="#label">label field</A>
|
||||
<LI> <A HREF="#operation">operation field</A>
|
||||
<LI> <A HREF="#operand">one or two operand fields</A>
|
||||
<LI> <A HREF="#comment">comment field</A>
|
||||
</UL>
|
||||
There should be at least one space between every two fields
|
||||
and there can't be any space within a field excluding strings.
|
||||
|
||||
</P><A NAME="label"><H4>Label field</H4>
|
||||
This field is optional. It starts from first character of line, without
|
||||
any blank characters before. It has two applications:
|
||||
<UL>
|
||||
<LI> Defining a label.<BR>
|
||||
Label is a symbol representing an integer of range -$ffff..$ffff.<BR>
|
||||
Name of a label can contain letters, digits and underscores (<TT>_</TT>).
|
||||
Digit can't be label's first character.
|
||||
Name of a label can be as long as you want and all the characters
|
||||
are meaningful. In Quick Assembler only 6 leading characters were recognized
|
||||
and some programs may not compile under X-Asm for this reason.<BR>
|
||||
Defining a label without using <TT>EQU</TT> makes it equal to current value
|
||||
of the origin counter.<BR>
|
||||
Label can't be redefined.<P>
|
||||
<A NAME="new_linerep">
|
||||
<LI> Repeating the line.<BR>
|
||||
Repeating means assembling single line several times as if
|
||||
there were several identical lines. Note it is not just duplicating
|
||||
bytes written to object.<BR>
|
||||
Repeat count, which can be any valid expression, has to be preceded
|
||||
with a colon.<BR>
|
||||
Examples:
|
||||
<PRE>:4 asl @
|
||||
:2 dta a(*)
|
||||
</PRE>
|
||||
In the latter example each <TT>DTA</TT> has different operand value.<BR>
|
||||
If repeat count equals zero, remaining part of line is not assembled.
|
||||
This allows conditional assembly on single line to be more compact.
|
||||
</UL>
|
||||
You can not define a label in line which you repeat.<P>
|
||||
|
||||
<A NAME="new_pairing">
|
||||
</P><A NAME="operation"><H4>Operation field</H4>
|
||||
Operation field is the only field which is always required.
|
||||
You have to put one or more spaces or tab characters between label
|
||||
and operation field. If no label is defined, line must start with a blank
|
||||
character. Operation field consists of one or two instructions.
|
||||
The latter case is called instructions pairing, because a pair
|
||||
of instructions have shared operand. You separate instructions
|
||||
with a colon.<BR>
|
||||
Example:
|
||||
<PRE> adc:sta $80
|
||||
</PRE>is equivalent to
|
||||
<PRE> adc $80
|
||||
sta $80
|
||||
</PRE>
|
||||
Single instruction always consists of 3 letters. It can be:
|
||||
<OL TYPE=a>
|
||||
<LI><I> 6502 command</I><BR>
|
||||
One of 56 well known processor commands.<BR><BR>
|
||||
|
||||
<LI><I> compiler directive</I><BR>
|
||||
One of the following:<P>
|
||||
<P><HR><P>
|
||||
<A NAME="directives"><H3>Directives</H3>
|
||||
<DL>
|
||||
<DT><TT><B>EQU</B></TT> - assign a value of expression to the label
|
||||
<DT><TT><B>EQU</B></TT> - assign a value of an expression to the label
|
||||
<DD>Note that label represents a number, not a text macro.<BR>
|
||||
Examples:
|
||||
<PRE>five equ 5
|
||||
@ -344,7 +402,7 @@ here equ *
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>OPT</B></TT> - set assembling options
|
||||
<DD>Currently there are two options: listing generating and headers generating.
|
||||
<DD>Currently there are two options: generating listing and generating headers.
|
||||
You can turn any of these on or off.<BR>
|
||||
Default (if no <TT>OPT</TT> specified) is <TT>opt l+h+</TT>.<BR>
|
||||
Examples:
|
||||
@ -359,7 +417,7 @@ Examples:
|
||||
<LI><TT>a:</TT> tells X-Asm to always make a header, even it is unnecessary,
|
||||
like in <TT>ORG *</TT>.
|
||||
<LI><TT>f:</TT> works same as <TT>a:</TT>, but additionally tells to generate
|
||||
a $ff,$ff prefix before header. X-Asm adds it to the first header in file
|
||||
a $ff,$ff prefix before header. X-Asm adds it at the beginning of file
|
||||
by default, so use this option only if you want the $ff's somewhere inside.<BR>
|
||||
</UL>
|
||||
Examples:
|
||||
@ -368,18 +426,20 @@ Examples:
|
||||
table org *+100
|
||||
</PRE>
|
||||
In the latter example <TT>table</TT> points to 100 bytes
|
||||
of uninitialized data (note label is assigned to <TT>*</TT>
|
||||
of uninitialized data (label is assigned to <TT>*</TT>
|
||||
before <TT>ORG</TT> directive is executed).<P>
|
||||
|
||||
<A NAME="new_dta">
|
||||
<DT><TT><B>DTA</B></TT> - define data
|
||||
<DD>There are various data types:
|
||||
<UL>
|
||||
<LI> numbers
|
||||
<LI> integers
|
||||
<UL>
|
||||
<LI> bytes: <TT>b(200)</TT>
|
||||
<LI> bytes: <TT>b(200)</TT> or simply <TT>200</TT>
|
||||
<LI> words: <TT>a(10000)</TT>
|
||||
<LI> low bytes of words: <TT>l(511)</TT> defines byte 255
|
||||
<LI> high bytes of words: <TT>h(511)</TT> defines byte 1<BR>
|
||||
<LI> high bytes of words: <TT>h(511)</TT> defines byte 1
|
||||
</UL>
|
||||
You may enter many expressions in parentheses and combine different types
|
||||
of data in single line, separating things with commas.<BR>
|
||||
You may also define a sinus table. Syntax is:<BR>
|
||||
@ -397,7 +457,6 @@ representing a quarter of sinus with amplitude of 1000.<P>
|
||||
<LI> real numbers: <TT>r(-1.23456e12)</TT><BR>
|
||||
Real numbers are written in 6-byte Atari Floating-Point format. You can't
|
||||
combine reals with operators, as you can integers.<P>
|
||||
</UL>
|
||||
<LI> text strings
|
||||
<UL>
|
||||
<LI> ASCII strings: <TT>c'Text'</TT> or <TT>c"Text"</TT>
|
||||
@ -411,12 +470,12 @@ high bit in every byte of string.<P>
|
||||
</UL>
|
||||
Examples of <TT>DTA</TT>:
|
||||
<PRE>
|
||||
dta b(2,5),a(1000,-1),l(12345,sin(0,127,256))
|
||||
dta d"ANTIC"*,c'It''s a string',b(155)
|
||||
dta b(1,2),3,a(1000,-1),l(12345,sin(0,127,256))
|
||||
dta d"ANTIC"*,c'It''s a string',$9b
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>ICL</B></TT> - include another source file
|
||||
<DD>Specifies another file to be included in the assembly as if the contests of
|
||||
<DD>Specifies another file to be included in the assembly as if the contents of
|
||||
the referenced file appeared in place of the <TT>ICL</TT> statement.
|
||||
The included file may contain other <TT>ICL</TT> statements.
|
||||
The <TT>.ASX</TT> extension is added if none given.<P>
|
||||
@ -437,7 +496,7 @@ Example:
|
||||
<DT><TT><B>INS</B></TT> - insert contents of file
|
||||
<DD>Copies every byte of specified file into object file and moves origin
|
||||
counter, as if these bytes were defined with <TT>DTA</TT>.<BR>
|
||||
You may specify range of inserted file. Syntax is:
|
||||
You may specify range of inserted file. Syntax is following:
|
||||
<PRE>
|
||||
ins 'file'[,offset[,length]]
|
||||
</PRE>
|
||||
@ -495,18 +554,19 @@ Example:
|
||||
</PRE>
|
||||
Above example can be rewritten using line repeating feature:
|
||||
<PRE>noscr equ 1
|
||||
:noscr<>0 lda #0
|
||||
:noscr=0 lda #$22
|
||||
:noscr lda #0
|
||||
:!noscr lda #$22
|
||||
sta $22f
|
||||
</PRE>
|
||||
|
||||
</DL>
|
||||
<LI><I> pseudo-command</I><BR>
|
||||
It is something like built-in macro.
|
||||
Note that it is not an illegal instruction and works on typical 6502.<P>
|
||||
<HR>
|
||||
<A NAME="pseudocom"><H3>Pseudo-commands</H3>
|
||||
Pseudo-commands are built-in macros.
|
||||
They are not illegal instructions and work on typical 6502.<P>
|
||||
<DL>
|
||||
<DT><TT><B>ADD</B></TT> - addition without carry
|
||||
<DD>If you ever programmed 6502, you must have noticed that you had
|
||||
<DD>If you have ever programmed 6502, you must have noticed that you had
|
||||
to use a <TT>CLC</TT> before <TT>ADC</TT> for every simple addition.<BR>
|
||||
X-Asm can do it for you. <TT>ADD</TT> replaces two instructions:
|
||||
<TT>CLC</TT> and <TT>ADC</TT>.<P>
|
||||
@ -516,7 +576,7 @@ X-Asm can do it for you. <TT>ADD</TT> replaces two instructions:
|
||||
|
||||
<A NAME="new_repskip">
|
||||
<DT><TT><B>RCC, RCS, REQ, RMI, RNE, RPL, RVC, RVS</B></TT> - conditional repeat
|
||||
<DD>They are branches to the previous instruction.
|
||||
<DD>These are branches to the previous instruction.
|
||||
They take no operand, because the branch target
|
||||
is the address of previously assembled instruction.<BR>
|
||||
Example:
|
||||
@ -524,7 +584,7 @@ Example:
|
||||
mva:rne $500,x $600,x+
|
||||
</PRE>
|
||||
The example code copies memory $500-$5ff to $600-$6ff.
|
||||
With standard 6502 commands only it would be:
|
||||
Here is the same written with standard 6502 commands only:
|
||||
<PRE> ldx #0
|
||||
loop lda $500,x
|
||||
sta $600,x
|
||||
@ -533,7 +593,7 @@ loop lda $500,x
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>SCC, SCS, SEQ, SMI, SNE, SPL, SVC, SVS</B></TT> - conditional skip
|
||||
<DD>They are branches over the next instructions. No operand is required,
|
||||
<DD>These are branches over the next instructions. No operand is required,
|
||||
because the target is the address of instruction following
|
||||
the next instruction.<BR>
|
||||
Example:
|
||||
@ -541,7 +601,7 @@ Example:
|
||||
add:sta $80
|
||||
scc:inc $81
|
||||
</PRE>
|
||||
In the above example word variable $80 is incremented by 40.<BR>
|
||||
In the above example word-sized variable $80 is incremented by 40.<BR>
|
||||
Nor conditional repeat nor skip pseudo-commands require operand,
|
||||
thus they can be paired with any other command.<P>
|
||||
|
||||
@ -565,7 +625,7 @@ Example:
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>MVA, MVX, MVY</B></TT> - move byte using accumulator, X or Y
|
||||
<DD>Any of these pseudo-commands requires two operands
|
||||
<DD>Each of these pseudo-commands requires two operands
|
||||
and substitutes two commands:
|
||||
<PRE> mva source dest = lda source : sta dest
|
||||
mvx source dest = ldx source : stx dest
|
||||
@ -573,16 +633,16 @@ and substitutes two commands:
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>MWA, MWX, MWY</B></TT> - move word using accumulator, X or Y
|
||||
<DD>They also require two operands
|
||||
<DD>These pseudo-commands require two operands
|
||||
and are combinations of two <TT>MV*</TT>'s:
|
||||
one to move low byte, and the other to move high byte.<BR>
|
||||
You can't use indirect nor pseudo addressing modes with <TT>MW*</TT>.
|
||||
Destination must be absolute address (indexed or not).<BR>
|
||||
You can't use indirect nor pseudo addressing mode with <TT>MW*</TT>.
|
||||
Destination must be absolute address (optionally indexed).<BR>
|
||||
When source is also absolute, a <TT>MW* SOURCE DEST</TT> will be:
|
||||
<PRE> mv* source dest
|
||||
mv* source+1 dest+1
|
||||
</PRE>
|
||||
When source is immediate, a <TT>MW* #IMMED DEST</TT> will be:
|
||||
When source is an immediate, a <TT>MW* #IMMED DEST</TT> will be:
|
||||
<PRE> mv* <immed dest
|
||||
mv* >immed dest+1
|
||||
</PRE>
|
||||
@ -594,22 +654,25 @@ is not forward-referenced, X-Asm uses optimization:
|
||||
</DL>
|
||||
</OL>
|
||||
|
||||
</P><A NAME="operand"><H4>Operand</H4>
|
||||
It depends on the operation field. Some statements don't need any operand,
|
||||
other need two operands.<P>
|
||||
|
||||
6502 commands require operand depending on the addressing mode.
|
||||
Addressing modes should be entered in standard convention except
|
||||
<HR>
|
||||
<A NAME="adrmod"><H3>Addressing modes</H3>
|
||||
All addressing modes are entered in standard convention except
|
||||
the accumulator addressing mode, which should be marked with a
|
||||
<TT>@</TT> character (as in Quick Assembler).<P>
|
||||
|
||||
There are two extra immediate addressing modes:
|
||||
<TT><</TT> and <TT>></TT>,
|
||||
which use low/high byte of word rather than byte value.<P>
|
||||
which use low/high byte of word rather than byte value.
|
||||
They are for Quick Assembler compatibility.
|
||||
You can use traditional <TT>#<</TT> and <TT>#></TT>.
|
||||
Note <NOBR><TT>lda >$ff+5</TT></NOBR> loads 1 (<TT>>$104</TT>),
|
||||
while <NOBR><TT>lda #>$ff+5</TT></NOBR>
|
||||
loads 5 (<TT>0+5</TT>) to accumulator, because unary operator <TT>></TT> has higher
|
||||
priority than plus has.<P>
|
||||
|
||||
In absolute addressing modes, X-Asm examines expression and uses zero-page
|
||||
addressing mode if it thinks it is possible to do it. You may override it
|
||||
with <TT>a:</TT> and <TT>z:</TT> prefixes.<P>
|
||||
addressing mode if it supposes it is possible. You may override it with
|
||||
<TT>a:</TT> and <TT>z:</TT> prefixes.<P>
|
||||
|
||||
Examples:
|
||||
<PRE>
|
||||
@ -623,7 +686,7 @@ Examples:
|
||||
</PRE>
|
||||
|
||||
There are also pseudo addressing modes, which are similar to
|
||||
pseudo-commands. You may use them as standard addressing modes
|
||||
pseudo-commands. You may use them just like standard addressing modes
|
||||
in all 6502 commands and pseudo-commands excluding
|
||||
<TT>MWA</TT>, <TT>MWX</TT> and <TT>MWY</TT> only:
|
||||
<PRE> cmd a,x+ = cmd a,x : inx
|
||||
@ -638,18 +701,8 @@ in all 6502 commands and pseudo-commands excluding
|
||||
cmd (z),0- = ldy #0 : cmd (z),y : dey
|
||||
</PRE>
|
||||
|
||||
</P><A NAME="comment"><H4>Comment</H4>
|
||||
Comment in a statement does not start from any special character
|
||||
like <TT>;</TT> for example. Comment field is implied when appropriate
|
||||
number of operands was taken.<P>
|
||||
|
||||
<HR></P><A NAME="faq">
|
||||
<H2><A HREF="#intro">INTRODUCTION</A>
|
||||
<A HREF="#usage">USAGE</A>
|
||||
<A HREF="#syntax">SYNTAX</A>
|
||||
FAQ
|
||||
<A HREF="index.htm">BACK</A>
|
||||
</H2>
|
||||
<HR>
|
||||
<A NAME="faq"><H2>FAQ</H2>
|
||||
<UL>
|
||||
<LI><B>Q:</B> Why does X-Asm ignore <TT>+2</TT> in following line?
|
||||
<PRE>label equ 1 +2
|
||||
@ -657,11 +710,12 @@ number of operands was taken.<P>
|
||||
<B>A:</B> X-Asm treats space as operand terminator. Remaining part of line
|
||||
is a comment. You should write <TT>1+2</TT> without any spaces.<P>
|
||||
|
||||
<LI><B>Q:</B> Why does <TT>lda #<table</TT> not work?<P>
|
||||
<B>A:</B> <TT><</TT> and <TT>></TT> represent addressing modes
|
||||
rather than LOW and HIGH operators.<BR>
|
||||
You specify <TT>lda <table</TT>, not <TT>lda #<table</TT>
|
||||
like in most 6502 assemblers.<P>
|
||||
<LI><B>Q:</B> Why does <TT>lda >$abcd</TT> assemble to
|
||||
<TT>lda #$ab</TT>?<P>
|
||||
<B>A:</B> <TT><</TT> and <TT>></TT> are not only 'low' and 'high'
|
||||
operators, but also 'low of immediate' and 'high of immediate'
|
||||
addressing modes indicators.
|
||||
In order to get <TT>lda $ab</TT>, write <TT>lda +>$abcd</TT><P>
|
||||
|
||||
<LI><B>Q:</B> What's wrong with <TT>asl a</TT> ?<P>
|
||||
<B>A:</B> You should use <TT>@</TT> for accumulator addressing mode.<P>
|
||||
@ -705,10 +759,9 @@ the value of <TT>three</TT> in second pass.<P>
|
||||
When I fixed it, another error appeared. Why?<P>
|
||||
<B>A:</B> X-Asm displays only first error.<BR>
|
||||
When you were assembling for the first time, both errors might exist,
|
||||
but X-Asm stopped assembling on the first one.<P>
|
||||
but X-Asm stopped on the first one.<P>
|
||||
|
||||
<LI> If you have other questions/problems,
|
||||
<A HREF=mailto:pfusik@elka.pw.edu.pl>write to me</A>.
|
||||
</UL>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</BODY></HTML>
|
@ -1,19 +1,28 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>X-BOOT 4.0 Manual</TITLE>
|
||||
<TITLE>X-BOOT 5.0 Manual</TITLE>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="6502proc.gif">
|
||||
<CENTER>
|
||||
<H1>X-BOOT version 4.0</H1>
|
||||
<H1>X-BOOT version 5.0</H1>
|
||||
by <A HREF="mailto:pfusik@elka.pw.edu.pl">Fox/Taquart</A><P>
|
||||
<HR>
|
||||
</CENTER>
|
||||
|
||||
<H2>INTRODUCTION</H2>
|
||||
This tool converts Atari executable file (.OBX) into Atari disk image (.ATR),
|
||||
which can be used in emulator. For loading executable into real Atari
|
||||
This tool converts Atari executable file (.OBX) to Atari disk image (.ATR),
|
||||
which can be used in an emulator. For loading executable into real Atari
|
||||
you need no .ATR, try using <A HREF="xload.htm">X-LOAD</A>.
|
||||
<H3>CHANGES</H3>
|
||||
<H4>Version 5.0</H4>
|
||||
<UL>
|
||||
<LI> long file names support
|
||||
<LI> more flexible syntax: <TT>obxmask atrfile</TT>
|
||||
and <TT>obxfile atrpath</TT> can be used
|
||||
<LI> internal write protection set in generated disk images
|
||||
<LI> headers with end address less than start allowed
|
||||
<LI> Unix-like <TT>-p</TT> option allowed
|
||||
</UL>
|
||||
<H4>Version 4.0</H4>
|
||||
<UL>
|
||||
<LI> wildcards support - now you can convert a set of files
|
||||
@ -34,34 +43,49 @@ you need no .ATR, try using <A HREF="xload.htm">X-LOAD</A>.
|
||||
|
||||
<HR>
|
||||
<H2>USAGE</H2>
|
||||
There are two ways of running X-BOOT:
|
||||
<UL>
|
||||
<LI><TT>XBOOT [/p] obxfile [atrfile]</TT>
|
||||
<LI><TT>XBOOT [/p] obxfiles [atrpath]</TT>
|
||||
</UL>
|
||||
The former converts single file, the latter a set of files.<P>
|
||||
This is syntax for running X-BOOT:<P>
|
||||
<TT>XBOOT [/p] obxfiles [atrpath][atrfile]</TT><P>
|
||||
Parameters in brackets are optional.<P>
|
||||
<TT>/p</TT> switch forces writing 'professional loader', which allows you to load
|
||||
code/data under ROM and disables ROM and interrupts while starting program.
|
||||
By default, standard loader is used, which can load any Atari executable
|
||||
not demanding DOS or any special loader.<P>
|
||||
If file name extension is omitted, the default .OBX or .ATR is added.
|
||||
If no <TT>atrpath</TT> is given, disk images are written by default in
|
||||
the directory where executables are.<P>
|
||||
If file name contains spaces, you should enclose it in quotation marks.<P>
|
||||
<TT>/p</TT> switch (or equivalent <TT>-p</TT>) forces writing 'professional loader',
|
||||
which allows you to load code/data under ROM and disables ROM and interrupts
|
||||
while starting program. By default, standard loader is used, which can load any
|
||||
Atari executable not demanding DOS nor any special loader.<P>
|
||||
Both loaders disable Atari Basic, so you needn't hold OPTION key while
|
||||
booting.<P>
|
||||
|
||||
Below are some examples:<P>
|
||||
<DL>
|
||||
<DT><TT>XBOOT -p test</TT>
|
||||
<DD>Converts <TT>test.obx</TT> to <TT>test.atr</TT> in current directory
|
||||
using professional loader.
|
||||
<DT><TT>XBOOT d:\games\*.xex \atrs\</TT>
|
||||
<DD>Converts all files in <TT>d:\games</TT> with <TT>.xex</TT> extension
|
||||
and writes disk images to directory <TT>\atrs</TT> on current drive
|
||||
using standard loader.
|
||||
<DT><TT>XBOOT "c:\test\Very Long File Name.AtariExecutable" /p</TT>
|
||||
<DD>Converts <NOBR><TT>c:\test\Very Long File Name.AtariExecutable</TT></NOBR> to
|
||||
<NOBR><TT>c:\test\Very Long File Name.atr</TT></NOBR> using professional loader.
|
||||
<DT><TT>XBOOT d:* /p .</TT>
|
||||
<DD>Converts all .OBX files in current directory on <TT>d:</TT>
|
||||
to current directory on current drive using professional loader.
|
||||
</DL>
|
||||
<HR>
|
||||
<H2>DETAILS</H2>
|
||||
Produced ATR is single density and as short as possible.
|
||||
Loader occupies one boot sector.<P>
|
||||
X-BOOT does not write executable in ATR as Atari file.
|
||||
You can't read it from DOS or extract it somehow or other.
|
||||
You can't read it from an Atari DOS nor extract it somehow or other.
|
||||
You can only run it by booting.<P>
|
||||
For more details, view sources of loaders:
|
||||
For more details, read sources of loaders:
|
||||
<UL>
|
||||
<LI>Standard: <A HREF="xbootstd.asx">XBOOTSTD.ASX</A>
|
||||
<LI>Professional: <A HREF="xbootpro.asx">XBOOTPRO.ASX</A>
|
||||
</UL>
|
||||
Loaders are so simple that they even do not detect end of file. Instead,
|
||||
they are modified when end of file is reached: disk image contains one
|
||||
they are modified when end of file is reached. Disk image contains one
|
||||
additional block, which doesn't belong to executable file, but changes
|
||||
loader to run program instead of initializing.
|
||||
</BODY>
|
||||
|
@ -52,7 +52,7 @@ bufx equ *-2 Buffer index
|
||||
mva #3 ^2f Yes: Reset POKEY...
|
||||
init jmp ($2e2) ... and call init routine
|
||||
|
||||
dta c'4.0p' Unused boot sector space
|
||||
dta c'5.0p' Unused boot sector space
|
||||
ert *<>boot+$80 Exactly 128 bytes should be used
|
||||
|
||||
* X-BOOT adds this block at the end of loaded file
|
||||
|
@ -51,7 +51,7 @@ init jmp ($2e2) ... and call init routine
|
||||
text dta d'Loading... '
|
||||
txtlen equ *-text
|
||||
|
||||
dta c'4.0' Unused boot sector space
|
||||
dta c'5.0' Unused boot sector space
|
||||
ert *<>boot+$80 Exactly 128 bytes should be used
|
||||
|
||||
* X-BOOT adds this block at the end of loaded file
|
||||
|
Loading…
x
Reference in New Issue
Block a user