mirror of
https://github.com/pfusik/xasm.git
synced 2025-02-14 02:30:28 +00:00
X-Assembler 2.2 release.
This commit is contained in:
parent
fd5370e7c4
commit
0c019b97d1
34
changes.txt
34
changes.txt
@ -1,34 +0,0 @@
|
||||
Version 2.1
|
||||
===========
|
||||
- ICL-in-last-line bug fixed
|
||||
- now 1 rather than -1 is true
|
||||
- line repeating
|
||||
- op-code extracting
|
||||
- Unix and Atari eols support
|
||||
|
||||
Version 2.0
|
||||
===========
|
||||
- truncating name of object bug fixed
|
||||
- EQU & DTA forward reference bugs fixed
|
||||
- hex number recognizing bug fixed
|
||||
- now .OBX is default extension for Atari executables
|
||||
- assembling options (switches and OPT directive)
|
||||
- listing generation
|
||||
- label table generation
|
||||
- conditional assembling
|
||||
- user errors
|
||||
- warnings
|
||||
- improved headers generation
|
||||
- improved expressions - 19 operators and brackets, 32-bit arithmetic
|
||||
- improved signed numbers
|
||||
- 6 new pseudo commands (memory-to-memory move)
|
||||
- 8 pseudo addressing modes
|
||||
- indirect conditional jumps
|
||||
- Atari floating-point numbers generation
|
||||
- improved INS: inserting specified part of file
|
||||
|
||||
Version 1.2
|
||||
===========
|
||||
- first release
|
||||
|
||||
===
|
61
dlist.txt
61
dlist.txt
@ -1,61 +0,0 @@
|
||||
Display List op-codes
|
||||
=====================
|
||||
|
||||
Blank lines
|
||||
-----------
|
||||
$00 - 1 blank line
|
||||
$10 - 2 blank lines
|
||||
$20 - 3 blank lines
|
||||
$30 - 4 blank lines
|
||||
$40 - 5 blank lines
|
||||
$50 - 6 blank lines
|
||||
$60 - 7 blank lines
|
||||
$70 - 8 blank lines
|
||||
|
||||
Jumps
|
||||
-----
|
||||
$01 $ll $hh - JMP $hhll - Jump & generate 1 blank line
|
||||
$41 $ll $hh - JVB $hhll - Jump after vertical blank
|
||||
|
||||
Modes
|
||||
-----
|
||||
Most popular combinations of ANTIC modes with GTIA modes:
|
||||
|
||||
ANTIC mode | GTIA mode | OS mode | screen | font | bytes/line
|
||||
----------------------------------------------------------------------
|
||||
$2 | %00 | $0 | 40* 30* 2 | 128*8*8* 2 | 40
|
||||
$2 | %01 | - | 40* 30*16 | 128*2*8*16 | 40
|
||||
$2 | %10 | - | 40* 30* 9 | 128*2*8* 9 | 40
|
||||
$2 | %11 | - | 40* 30*16 | 128*2*8*16 | 40
|
||||
$3 | %00 | - | 40* 24* 2 | 128*8*8* 2 | 40
|
||||
$4 | %00 | $c | 40* 30* 5 | 128*4*8* 4 | 40
|
||||
$5 | %00 | $d | 40* 15* 5 | 128*4*8* 4 | 40
|
||||
$6 | %00 | $1 | 20* 30* 5 | 64*8*8* 2 | 20
|
||||
$7 | %00 | $3 | 20* 15* 5 | 64*8*8* 2 | 20
|
||||
$8 | %00 | $3 | 40* 30* 4 | - | 10
|
||||
$9 | %00 | $4 | 80* 60* 2 | - | 10
|
||||
$a | %00 | $5 | 80* 60* 4 | - | 20
|
||||
$b | %00 | $6 | 160*120* 2 | - | 20
|
||||
$c | %00 | $e | 160*240* 2 | - | 20
|
||||
$d | %00 | $7 | 160*120* 4 | - | 40
|
||||
$e | %00 | $f | 160*240* 4 | - | 40
|
||||
$f | %00 | $8 | 320*240* 2 | - | 40
|
||||
$f | %01 | $9 | 80*240*16 | - | 40
|
||||
$f | %10 | $a | 80*240* 9 | - | 40
|
||||
$f | %11 | $b | 80*240*16 | - | 40
|
||||
|
||||
screen: columns*rows*colors
|
||||
font: chars*sizex*sizey*colors
|
||||
|
||||
+$10 - Horizontal Scroll
|
||||
+$20 - Vertical Scroll
|
||||
+$40 $ll $hh - Load Screen Pointer $hhll
|
||||
|
||||
For all op-codes
|
||||
----------------
|
||||
+$80 - Display List Interrupt after getting all data for this line
|
||||
|
||||
When placing Display List in memory, remember it cannot cross 1 kB boundary.
|
||||
Similarly, screen memory cannot cross 4 kB boundary.
|
||||
|
||||
===
|
BIN
doc/6502proc.gif
Normal file
BIN
doc/6502proc.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 592 B |
@ -1,4 +1,4 @@
|
||||
* This program examines 6502 bugs!
|
||||
* This program detects 6502 bugs.
|
||||
* Please read text after program first.
|
||||
|
||||
icmd equ $342
|
||||
@ -21,7 +21,7 @@ start lda #11 Clear screen
|
||||
lda #$99 BCD 99+01=00
|
||||
add #1
|
||||
cld
|
||||
beq *+4 Z flag set: no bug
|
||||
seq Z flag set: no bug
|
||||
lda #$ff
|
||||
ldx <adctxt
|
||||
jsr print
|
||||
@ -36,10 +36,9 @@ start lda #11 Clear screen
|
||||
irq brk BRK interrupt - infinite loop, so...
|
||||
nmi inc ^31 NMI always occurs on BRK
|
||||
cli
|
||||
pla
|
||||
pla
|
||||
pla:pla
|
||||
sub <irq
|
||||
beq *+4 Return adr points BRK: no bug
|
||||
seq Return adr points BRK: no bug
|
||||
lda #$ff
|
||||
ldx <brktxt
|
||||
jsr print
|
||||
@ -57,7 +56,7 @@ print pha Save A
|
||||
jsr callio
|
||||
ldx <nobtxt
|
||||
pla Restore A
|
||||
beq *+4 A=0: X=<nobtxt
|
||||
seq A=0: X=<nobtxt
|
||||
ldx <bugtxt A<>0: X=<bugtxt
|
||||
lda #9 CIO write_to_eol command
|
||||
ldy #$ff Limit of printed characters
|
||||
@ -76,7 +75,7 @@ jmptxt dta c'JMP'
|
||||
bugtxt dta c' bug detected!',b($9b)
|
||||
nobtxt dta c' bug NOT detected.',b($9b)
|
||||
|
||||
ert *>*|$ff Program should fit on one page
|
||||
ert *>start|$ff Program should fit on one page
|
||||
org *|$ff
|
||||
jmpptr dta a(jmp1)
|
||||
|
||||
@ -86,7 +85,7 @@ jmp1 lda #0 JMP bug not detected
|
||||
run start
|
||||
end
|
||||
|
||||
The program above checks 3 bugs:
|
||||
The program above detects 3 bugs:
|
||||
- 'ADC bug'
|
||||
Flags N,V,Z are not properly set after ADC or SBC in decimal mode.
|
||||
You can't rely on these flags after BCD operation.
|
||||
@ -95,8 +94,6 @@ If an interrupt occurs on a BRK, it is executed with BRK-like values on stack.
|
||||
This means a BRK is simply passed-by if a NMI occurs.
|
||||
Beware of using BRK with other interrupts.
|
||||
- 'JMP bug' - JMP ($xxff) fetches address from $xxff and $xx00.
|
||||
X-Asm 2.0 warns you of using such a jump.
|
||||
X-Asm warns you of using such a jump.
|
||||
|
||||
All these bugs are supposedly fixed in CMOS chips.
|
||||
|
||||
===
|
51
doc/gr0.htm
Normal file
51
doc/gr0.htm
Normal file
@ -0,0 +1,51 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>GR0 1.1 Manual</TITLE>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="6502proc.gif">
|
||||
<CENTER>
|
||||
<H1>GR0 version 1.1</H1>
|
||||
by <A HREF="mailto:pfusik@elka.pw.edu.pl">Fox/Taquart</A><P>
|
||||
<HR>
|
||||
</CENTER>
|
||||
|
||||
<H2>INTRODUCTION</H2>
|
||||
GR0 is a simple tool that can change colors and font of DOS screen.
|
||||
It can setup it to look similar to Atari text mode.
|
||||
<H3>CHANGES</H3>
|
||||
<H4>Version 1.1</H4>
|
||||
<UL>
|
||||
<LI> first release
|
||||
</UL>
|
||||
|
||||
<HR>
|
||||
<H2>USAGE</H2>
|
||||
You can run GR0 without any parameters to see available options. They are:
|
||||
<DL>
|
||||
<DT><TT>/a</TT>
|
||||
<DD>Set Atari scheme. It is equivalent to options <TT>/b:1 /c:7 /n /l /x</TT><P>
|
||||
<DT><TT>/b:nn</TT>
|
||||
<DD>Set background color nn, where nn is decimal number of range 0-15<P>
|
||||
<DT><TT>/c:nn</TT>
|
||||
<DD>Set foreground (letters) color nn, where nn is decimal number of range 0-15<P>
|
||||
<DT><TT>/d</TT>
|
||||
<DD>Set default PC font. Resets all characters.<P>
|
||||
<DT><TT>/f:fname</TT>
|
||||
<DD>Set external Atari font. Reads characters 0-127 from standard Atari font file
|
||||
(8*8*128). In 25 lines mode, font is resized. Default extension .FNT will be added
|
||||
to filename, if none given.<P>
|
||||
<DT><TT>/i</TT>
|
||||
<DD>Set characters 128-255 to inverse of 0-127.
|
||||
<TT>/i</TT> can only be used with <TT>/a</TT>, <TT>/f</TT> or <TT>/x</TT>.<P>
|
||||
<DT><TT>/l</TT>
|
||||
<DD>Select 50 lines font. Without this option, 25 lines font is selected.<P>
|
||||
<DT><TT>/n</TT>
|
||||
<DD>Initialize text mode. Clears screen and restores default font and colors.<P>
|
||||
<DT><TT>/x</TT>
|
||||
<DD>Set Atari built-in font. Sets characters 0-127 to standard Atari font.
|
||||
It looks better with /l option.<P>
|
||||
</DL>
|
||||
In Windows, font changes only in full-screen mode. Colors and number of lines change
|
||||
also in a window.
|
||||
</BODY>
|
||||
</HTML>
|
221
doc/gtia.htm
Normal file
221
doc/gtia.htm
Normal file
@ -0,0 +1,221 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>GTIA Documentation</TITLE>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="6502proc.gif">
|
||||
<CENTER>
|
||||
<H1>GTIA 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>
|
||||
<TD><I> Address </I></TD><TD><I> Read register </I></TD><TD><I> Write register </I></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^00</TT></TD><TD><A HREF="#kolmxpf">KOLM0PF</A></TD><TD><A HREF="#hpospx">HPOSP0</A></TD>
|
||||
<TD ALIGN=center><TT>^10</TT></TD><TD><A HREF="#trigx">TRIG0</A></TD><TD><A HREF="#grafpx">GRAFP3</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^01</TT></TD><TD><A HREF="#kolmxpf">KOLM1PF</A></TD><TD><A HREF="#hpospx">HPOSP1</A></TD>
|
||||
<TD ALIGN=center><TT>^11</TT></TD><TD><A HREF="#trigx">TRIG1</A></TD><TD><A HREF="#grafm">GRAFPM</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^02</TT></TD><TD><A HREF="#kolmxpf">KOLM2PF</A></TD><TD><A HREF="#hpospx">HPOSP2</A></TD>
|
||||
<TD ALIGN=center><TT>^12</TT></TD><TD>unused</TD><TD><A HREF="#colpmx">COLPM0</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^03</TT></TD><TD><A HREF="#kolmxpf">KOLM3PF</A></TD><TD><A HREF="#hpospx">HPOSP3</A></TD>
|
||||
<TD ALIGN=center><TT>^13</TT></TD><TD><A HREF="#trigx">TRIG3</A></TD><TD><A HREF="#colpmx">COLPM1</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^04</TT></TD><TD><A HREF="#kolpxpf">KOLP0PF</A></TD><TD><A HREF="#hposmx">HPOSM0</A></TD>
|
||||
<TD ALIGN=center><TT>^14</TT></TD><TD><A HREF="#pal">PAL</A></TD><TD><A HREF="#colpmx">COLPM2</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^05</TT></TD><TD><A HREF="#kolpxpf">KOLP1PF</A></TD><TD><A HREF="#hposmx">HPOSM1</A></TD>
|
||||
<TD ALIGN=center><TT>^15</TT></TD><TD>unused</TD><TD><A HREF="#colpmx">COLPM3</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^06</TT></TD><TD><A HREF="#kolpxpf">KOLP2PF</A></TD><TD><A HREF="#hposmx">HPOSM2</A></TD>
|
||||
<TD ALIGN=center><TT>^16</TT></TD><TD>unused</TD><TD><A HREF="#colpfx">COLPF0</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^07</TT></TD><TD><A HREF="#kolpxpf">KOLP3PF</A></TD><TD><A HREF="#hposmx">HPOSM3</A></TD>
|
||||
<TD ALIGN=center><TT>^17</TT></TD><TD>unused</TD><TD><A HREF="#colpfx">COLPF1</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^08</TT></TD><TD><A HREF="#kolmxp">KOLM0P</A></TD><TD><A HREF="#sizepx">SIZEP0</A></TD>
|
||||
<TD ALIGN=center><TT>^18</TT></TD><TD>unused</TD><TD><A HREF="#colpfx">COLPF2</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^09</TT></TD><TD><A HREF="#kolmxp">KOLM1P</A></TD><TD><A HREF="#sizepx">SIZEP1</A></TD>
|
||||
<TD ALIGN=center><TT>^19</TT></TD><TD>unused</TD><TD><A HREF="#colpfx">COLPF3</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^0A</TT></TD><TD><A HREF="#kolmxp">KOLM2P</A></TD><TD><A HREF="#sizepx">SIZEP2</A></TD>
|
||||
<TD ALIGN=center><TT>^1A</TT></TD><TD>unused</TD><TD><A HREF="#colbak">COLBAK</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^0B</TT></TD><TD><A HREF="#kolmxp">KOLM3P</A></TD><TD><A HREF="#sizepx">SIZEP3</A></TD>
|
||||
<TD ALIGN=center><TT>^1B</TT></TD><TD>unused</TD><TD><A HREF="#gtiactl">GTIACTL</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^0C</TT></TD><TD><A HREF="#kolpxp">KOLP0P</A></TD><TD><A HREF="#sizem">SIZEM</A></TD>
|
||||
<TD ALIGN=center><TT>^1C</TT></TD><TD>unused</TD><TD><A HREF="#vdelay">VDELAY</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^0D</TT></TD><TD><A HREF="#kolpxp">KOLP1P</A></TD><TD><A HREF="#grafpx">GRAFP0</A></TD>
|
||||
<TD ALIGN=center><TT>^1D</TT></TD><TD>unused</TD><TD><A HREF="#pmcntl">PMCNTL</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^0E</TT></TD><TD><A HREF="#kolpxp">KOLP2P</A></TD><TD><A HREF="#grafpx">GRAFP1</A></TD>
|
||||
<TD ALIGN=center><TT>^1E</TT></TD><TD>unused</TD><TD><A HREF="#hitclr">HITCLR</A></TD>
|
||||
</TR><TR>
|
||||
<TD ALIGN=center><TT>^0F</TT></TD><TD><A HREF="#kolpxp">KOLP3P</A></TD><TD><A HREF="#grafpx">GRAFP2</A></TD>
|
||||
<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>
|
||||
<H2>Description</H2>
|
||||
</CENTER>
|
||||
|
||||
<A NAME="colbak"><U>COLBAK</U>
|
||||
- <B>Color of background</B><BR>
|
||||
bit 0 - unused<BR>
|
||||
bits 3-1 - luminace<BR>
|
||||
bits 7-4 - hue<P>
|
||||
|
||||
<A NAME="colpfx"><U>COLPF0</U> <U>COLPF1</U> <U>COLPF2</U> <U>COLPF3</U>
|
||||
- <B>Colors of player field</B><BR>
|
||||
bit 0 - unused<BR>
|
||||
bits 3-1 - luminace<BR>
|
||||
bits 7-4 - hue<P>
|
||||
|
||||
<A NAME="colpmx"><U>COLPM0</U> <U>COLPM1</U> <U>COLPM2</U> <U>COLPM3</U>
|
||||
- <B>Colors of players and missiles</B><BR>
|
||||
bit 0 - unused<BR>
|
||||
bits 3-1 - luminace<BR>
|
||||
bits 7-4 - hue<P>
|
||||
|
||||
<A NAME="consol"><U>CONSOL</U>
|
||||
- <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>
|
||||
bit 0 - START key<BR>
|
||||
bit 1 - SELECT key<BR>
|
||||
bit 2 - OPTION key<BR>
|
||||
bit 3 - click sound<BR>
|
||||
bits 4-7 - unused (=0)<P>
|
||||
|
||||
<A NAME="grafm"><U>GRAFM</U>
|
||||
- <B>Graphics of missiles</B><BR>
|
||||
bits 1,0 - graphics of missile 0<BR>
|
||||
bits 3,2 - graphics of missile 1<BR>
|
||||
bits 5,4 - graphics of missile 2<BR>
|
||||
bits 7,6 - graphics of missile 3<P>
|
||||
|
||||
<A NAME="grafpx"><U>GRAFP0</U> <U>GRAFP1</U> <U>GRAFP2</U> <U>GRAFP3</U>
|
||||
- <B>Graphics of players</B><P>
|
||||
|
||||
<A NAME="gtiactl"><U>GTIACTL</U>
|
||||
- <B>GTIA control</B><BR>
|
||||
bits 3-0 - priorities of players and missiles<BR>
|
||||
0001 - P0, P1, P2, P3, PF0, PF1, PF2, PF3, BAK<BR>
|
||||
0010 - P0, P1, PF0, PF1, PF2, PF3, P2, P3, BAK<BR>
|
||||
0100 - PF0, PF1, PF2, PF3, P0, P1, P2, P3, BAK<BR>
|
||||
1000 - PF0, PF1, P0, P1, P2, P3, PF2, PF3, BAK<BR>
|
||||
Players/missiles and playfields are mentioned from highest to lowest priority.<BR>
|
||||
Other combinations of bits 3-0 cause strange side effects.<BR>
|
||||
bit 4 - set all missiles color to COLPF3<BR>
|
||||
bit 5 - enable ORing colors P0 with P1 and P2 with P3 on common areas<BR>
|
||||
bits 7,6 - GTIA extra graphics mode<BR>
|
||||
00 - off<BR>
|
||||
01 - 16 luminaces<BR>
|
||||
10 - 9 colors<BR>
|
||||
11 - 16 hues<P>
|
||||
|
||||
<A NAME="hitclr"><U>HITCLR</U>
|
||||
- <B>Clear collision registers</B><BR>
|
||||
Any value written to this register causes collision registers to be reset.<P>
|
||||
|
||||
<A NAME="hposmx"><U>HPOSM0</U> <U>HPOSM1</U> <U>HPOSM2</U> <U>HPOSM3</U>
|
||||
- <B>Horizontal positions of missiles</B><P>
|
||||
|
||||
<A NAME="hpospx"><U>HPOSP0</U> <U>HPOSP1</U> <U>HPOSP2</U> <U>HPOSP3</U>
|
||||
- <B>Horizontal positions of players</B><P>
|
||||
|
||||
<A NAME="kolmxp"><U>KOLM0P</U> <U>KOLM1P</U> <U>KOLM2P</U> <U>KOLM3P</U>
|
||||
- <B>Collisions of missiles with players</B><BR>
|
||||
bit 0 - collision with player 0<BR>
|
||||
bit 1 - collision with player 1<BR>
|
||||
bit 2 - collision with player 2<BR>
|
||||
bit 3 - collision with player 3<BR>
|
||||
bits 4-7 - unused (=0)<P>
|
||||
|
||||
<A NAME="kolmxpf"><U>KOLM0PF</U> <U>KOLM1PF</U> <U>KOLM2PF</U> <U>KOLM3PF</U>
|
||||
- <B>Collisions of missiles with playfield</B><BR>
|
||||
bit 0 - collision with playfield 0<BR>
|
||||
bit 1 - collision with playfield 1<BR>
|
||||
bit 2 - collision with playfield 2<BR>
|
||||
bit 3 - collision with playfield 3<BR>
|
||||
bits 4-7 - unused (=0)<P>
|
||||
|
||||
<A NAME="kolpxp"><U>KOLP0P</U> <U>KOLP1P</U> <U>KOLP2P</U> <U>KOLP3P</U>
|
||||
- <B>Collisions of players with players</B><BR>
|
||||
bit 0 - collision with player 0<BR>
|
||||
bit 1 - collision with player 1<BR>
|
||||
bit 2 - collision with player 2<BR>
|
||||
bit 3 - collision with player 3<BR>
|
||||
bits 4-7 - unused (=0)<P>
|
||||
|
||||
<A NAME="kolpxpf"><U>KOLP0PF</U> <U>KOLP1PF</U> <U>KOLP2PF</U> <U>KOLP3PF</U>
|
||||
- <B>Collisions of players with playfield</B><BR>
|
||||
bit 0 - collision with playfield 0<BR>
|
||||
bit 1 - collision with playfield 1<BR>
|
||||
bit 2 - collision with playfield 2<BR>
|
||||
bit 3 - collision with playfield 3<BR>
|
||||
bits 4-7 - unused (=0)<P>
|
||||
|
||||
<A NAME="pal"><U>PAL</U>
|
||||
- <B>PAL system flag</B><BR>
|
||||
bit 0 - unused<BR>
|
||||
bits 1-3 - 000 if TV system is PAL. Else it is NTSC<BR>
|
||||
bits 4-7 - unused (=0)<P>
|
||||
|
||||
<A NAME="pmctl"><U>PMCTL</U>
|
||||
- <B>Player/Missile Control</B><BR>
|
||||
bit 0 - get missiles data from ANTIC<BR>
|
||||
bit 1 - get players data from ANTIC<BR>
|
||||
bit 2 - lock triggers when pressed<BR>
|
||||
bits 3-7 - unused<P>
|
||||
|
||||
<A NAME="sizem"><U>SIZEM</U>
|
||||
- <B>Sizes of missiles</B><BR>
|
||||
Two bits set size of each missile:<BR>
|
||||
00 - single size<BR>
|
||||
01 - double size<BR>
|
||||
10 - single size<BR>
|
||||
11 - quad size<BR>
|
||||
bits 1,0 - size of missile 0<BR>
|
||||
bits 3,2 - size of missile 1<BR>
|
||||
bits 5,4 - size of missile 2<BR>
|
||||
bits 7,6 - size of missile 3<P>
|
||||
|
||||
<A NAME="sizepx"><U>SIZEP0</U> <U>SIZEP1</U> <U>SIZEP2</U> <U>SIZEP3</U>
|
||||
- <B>Sizes of players</B><BR>
|
||||
bits 1,0 - size of player (see <A HREF="#sizem">SIZEM</A>)<BR>
|
||||
bits 2-7 - unused<P>
|
||||
|
||||
<A NAME="trigx"><U>TRIG0</U> <U>TRIG1</U> <U>TRIG3</U>
|
||||
- <B>Triggers</B><BR>
|
||||
TRIG0 and TRIG1 contain trigger status of two joysticks.
|
||||
TRIG3 contains presence of cartridge.<BR>
|
||||
bit 0 - reset if trigger pressed<BR>
|
||||
bits 1-7 - unused (=0)<P>
|
||||
|
||||
<A NAME="vdelay"><U>VDELAY</U>
|
||||
- <B>Vertical delay of players and missiles</B><BR>
|
||||
Causes players and missiles to be displayed one scanline lower.
|
||||
Works only in two-line resolution.<BR>
|
||||
bit 0 - delay missile 0<BR>
|
||||
bit 1 - delay missile 1<BR>
|
||||
bit 2 - delay missile 2<BR>
|
||||
bit 3 - delay missile 3<BR>
|
||||
bit 4 - delay player 0<BR>
|
||||
bit 5 - delay player 1<BR>
|
||||
bit 6 - delay player 2<BR>
|
||||
bit 7 - delay player 3<P>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
33
doc/index.htm
Normal file
33
doc/index.htm
Normal file
@ -0,0 +1,33 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>X-ASM 2.2 Package Documentation</TITLE>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="6502proc.gif">
|
||||
<CENTER>
|
||||
<H1>X-ASM Package version 2.2</H1>
|
||||
by <A HREF="mailto:pfusik@elka.pw.edu.pl">Fox/Taquart</A><P>
|
||||
<HR>
|
||||
<P>
|
||||
Manuals of utilities:<P>
|
||||
<TABLE>
|
||||
<TR><TD><A HREF="xasm.htm">X-Assembler</A></TD><TD>6502 cross-assembler</TD></TR>
|
||||
<TR><TD><A HREF="xboot.htm">X-BOOT</A></TD><TD>Atari executable -> disk image converter</TD></TR>
|
||||
<TR><TD><A HREF="xhead.htm">X-HEAD</A></TD><TD>Simple Atari executable analyzer</TD></TR>
|
||||
<TR><TD><A HREF="xload.htm">X-LOAD</A></TD><TD>SIO2PC interface Atari executable loader</TD></TR>
|
||||
<TR><TD><A HREF="gr0.htm">GR0</A></TD><TD>DOS screen adjuster</TD></TR>
|
||||
</TABLE>
|
||||
<P>
|
||||
<HR>
|
||||
<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="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.
|
||||
</CENTER>
|
||||
</BODY>
|
||||
</HTML>
|
714
doc/xasm.htm
Normal file
714
doc/xasm.htm
Normal file
@ -0,0 +1,714 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>X-Assembler 2.2 Manual</TITLE>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="6502proc.gif">
|
||||
<CENTER>
|
||||
<H1>X-Assembler version 2.2</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>
|
||||
<UL>
|
||||
<LI> invalid absolute <TT>CPX</TT> and <TT>CPY</TT> op-codes bug fixed
|
||||
<LI> branch addressing mode not checking bug fixed
|
||||
<LI> <TT>ICL</TT> in last line bug fixed
|
||||
<LI> <TT>OPT H-H+</TT> bug fixed
|
||||
<LI> first <TT>ORG *</TT> bug fixed
|
||||
<LI> origin setting not required until not used
|
||||
<LI> Unix ($0a), Macintosh ($0d) and Atari ($9b) EOLs allowed in source
|
||||
<LI> value of 'true' changed to 1
|
||||
<LI> <A HREF="#new_environment">
|
||||
setting environment variables on error option</A>
|
||||
<LI> <A HREF="#new_newer">
|
||||
assembling only if source newer than object option</A>
|
||||
<LI> <A HREF="#new_opcode">op-code extracting</A>
|
||||
<LI> <A HREF="#new_linerep">line repeating</A>
|
||||
<LI> <A HREF="#new_pairing">instructions pairing</A>
|
||||
<LI> <A HREF="#new_repskip">conditional repeat and skip pseudo commands</A>
|
||||
<LI> <A HREF="#new_adrmodes">
|
||||
<TT>(),0+</TT> and <TT>(),0-</TT> pseudo addressing modes</A>
|
||||
</UL>
|
||||
<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
|
||||
<LI> hex number recognizing bug fixed
|
||||
<LI> now <TT>.OBX</TT> is default extension for Atari executables
|
||||
<LI> assembling options (switches and <TT>OPT</TT> directive)
|
||||
<LI> listing generation
|
||||
<LI> label table generation
|
||||
<LI> conditional assembling
|
||||
<LI> user errors
|
||||
<LI> warnings
|
||||
<LI> improved headers generation
|
||||
<LI> improved expressions - 19 operators and brackets, 32-bit arithmetic
|
||||
<LI> improved signed numbers
|
||||
<LI> 6 new pseudo commands (memory-to-memory move)
|
||||
<LI> 8 pseudo addressing modes
|
||||
<LI> indirect conditional jumps
|
||||
<LI> Atari floating-point numbers generation
|
||||
<LI> improved <TT>INS</TT>: inserting specified part of file
|
||||
</UL>
|
||||
<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>
|
||||
<UL>
|
||||
<LI> a PC compatible computer with 386 or better CPU
|
||||
<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>
|
||||
<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:
|
||||
<DL>
|
||||
<DT><TT>/c</TT>
|
||||
<DD>Enable listing false conditionals.<BR>
|
||||
By default lines skipped because of 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:
|
||||
<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 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>
|
||||
<DT><TT>/l[:fname]</TT>
|
||||
<DD>Enable generating listing.
|
||||
If no <TT>fname</TT> given, listing is written to <TT>source.lst.</TT><P>
|
||||
<A NAME="new_newer">
|
||||
<DT><TT>/n</TT>
|
||||
<DD>Check source and object modification times and assemble only
|
||||
if source is newer than object file. X-Asm does NOT check included
|
||||
nor inserted files but only main source, so be careful with this option.<P>
|
||||
<DT><TT>/o:fname</TT>
|
||||
<DD>Specify object name. Default is <TT>source.obx</TT>.<P>
|
||||
<DT><TT>/s</TT>
|
||||
<DD>Disable converting spaces to tabs in listing.
|
||||
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>
|
||||
</DL>
|
||||
|
||||
If source is incorrect, X-Asm stops on first encountered error.<P>
|
||||
|
||||
Errorlevels 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>
|
||||
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
|
||||
<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>
|
||||
is the last byte of the block.
|
||||
A <TT>FFFF></TT> represents two $ff bytes written as a header prefix.<BR>
|
||||
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>
|
||||
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)
|
||||
<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>
|
||||
|
||||
</P><A NAME="expressions">
|
||||
<H3>Expressions <A HREF="#statements">Statements</A></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>
|
||||
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 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>
|
||||
<TR><TD><UL><LI> a hardware register</TD><TD><TT>^31</TT></TD></TR>
|
||||
</UL></TABLE>
|
||||
<DIV STYLE="MARGIN-LEFT: 54">
|
||||
An abbreviation of Atari hardware register:<BR>
|
||||
<TT>^0x</TT> means <TT>$d00x</TT><BR>
|
||||
<TT>^1x</TT> means <TT>$d01x</TT><BR>
|
||||
<TT>^2x</TT> means <TT>$d20x</TT><BR>
|
||||
<TT>^3x</TT> means <TT>$d30x</TT><BR>
|
||||
<TT>^4x</TT> means <TT>$d40x</TT><BR>
|
||||
where x is a hexadecimal digit.
|
||||
</DIV>
|
||||
<A NAME="new_opcode">
|
||||
<TABLE>
|
||||
<TR><TD WIDTH=300><UL><LI> an op-code</TD><TD><TT>{lda #0}</TT></TD></TR>
|
||||
</UL></TABLE>
|
||||
<DIV STYLE="MARGIN-LEFT: 54">
|
||||
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.
|
||||
</DIV>
|
||||
<P>
|
||||
|
||||
<H4>Operators</H4>
|
||||
Currently there are 19 operators:<P>
|
||||
|
||||
<TABLE>
|
||||
<TR><TD><TT>+ </TT></TD><TD>Addition</TD></TR>
|
||||
<TR><TD><TT>- </TT></TD><TD>Subtraction</TD></TR>
|
||||
<TR><TD><TT>* </TT></TD><TD>Multiplication</TD></TR>
|
||||
<TR><TD><TT>/ </TT></TD><TD>Division</TD></TR>
|
||||
<TR><TD><TT>% </TT></TD><TD>Remainder</TD></TR>
|
||||
<TR><TD><TT>& </TT></TD><TD>Bitwise and</TD></TR>
|
||||
<TR><TD><TT>| </TT></TD><TD>Bitwise or</TD></TR>
|
||||
<TR><TD><TT>^ </TT></TD><TD>Bitwise xor</TD></TR>
|
||||
<TR><TD><TT><< </TT></TD><TD>Arithmetic shift left</TD></TR>
|
||||
<TR><TD><TT>>> </TT></TD><TD>Arithmetic shift right</TD></TR>
|
||||
<TR><TD><TT>= </TT></TD><TD>Equal</TD></TR>
|
||||
<TR><TD><TT><> </TT></TD><TD>Not equal</TD></TR>
|
||||
<TR><TD><TT>!= </TT></TD><TD>Not equal (same as <TT><></TT>)</TD></TR>
|
||||
<TR><TD><TT>< </TT></TD><TD>Less than</TD></TR>
|
||||
<TR><TD><TT>> </TT></TD><TD>Greater than</TD></TR>
|
||||
<TR><TD><TT><= </TT></TD><TD>Less or equal</TD></TR>
|
||||
<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>
|
||||
<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>
|
||||
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
|
||||
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>
|
||||
<DL>
|
||||
<DT><TT><B>EQU</B></TT> - assign a value of expression to the label
|
||||
<DD>Note that label represents a number, not a text macro.<BR>
|
||||
Examples:
|
||||
<PRE>five equ 5
|
||||
here equ *
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>OPT</B></TT> - set assembling options
|
||||
<DD>Currently there are two options: listing generating and headers generating.
|
||||
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:
|
||||
<PRE> opt l- listing off
|
||||
opt h- headers off
|
||||
opt l+h- listing on, headers off
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>ORG</B></TT> - set new origin counter
|
||||
<DD>You can set some options applied to new header (if headers are on):
|
||||
<UL>
|
||||
<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
|
||||
by default, so use this option only if you want the $ff's somewhere inside.<BR>
|
||||
</UL>
|
||||
Examples:
|
||||
<PRE> org $600
|
||||
org f:$700
|
||||
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>
|
||||
before <TT>ORG</TT> directive is executed).<P>
|
||||
|
||||
<DT><TT><B>DTA</B></TT> - define data
|
||||
<DD>There are various data types:
|
||||
<UL>
|
||||
<LI> numbers
|
||||
<UL>
|
||||
<LI> bytes: <TT>b(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>
|
||||
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>
|
||||
<TT>sin(centre,amp,size,first,last)</TT><BR>
|
||||
where:
|
||||
<UL>
|
||||
<LI> <TT>centre</TT> is a number which is added to every sinus value
|
||||
<LI> <TT>amp</TT> is the amplitude of sinus
|
||||
<LI> <TT>size</TT> is the period of sinus
|
||||
<LI> <TT>first,last</TT> define range of values in the table.
|
||||
They are optional. Default are <TT>0,size-1</TT>.
|
||||
</UL>
|
||||
Example: <TT>dta a(sin(0,1000,256,0,63))</TT> defines table of 64 words
|
||||
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>
|
||||
<LI> ANTIC strings: <TT>d'Text'</TT> or <TT>d"Text"</TT>
|
||||
</UL>
|
||||
A character string consists of any of characters surrounded by quotation
|
||||
marks. Within a string, a single quotation mark character is
|
||||
represented by two succesive quotation marks.<BR>
|
||||
Placing a <TT>*</TT> character after a string inverts
|
||||
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)
|
||||
</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
|
||||
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>
|
||||
Examples:
|
||||
<PRE>
|
||||
icl 'macros.asx'
|
||||
icl 'c:\atari\xasm\fileio'
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>END</B></TT> - end assembling file
|
||||
<DD>Remaining part of the file is not assembled. If this statement does
|
||||
not occur, assembler stops assembling when encounters end of file.<BR>
|
||||
Example:
|
||||
<PRE>
|
||||
end
|
||||
</PRE>
|
||||
|
||||
<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:
|
||||
<PRE>
|
||||
ins 'file'[,offset[,length]]
|
||||
</PRE>
|
||||
First byte in file has offset 0.<BR>
|
||||
If offset is negative, it is counted from the end of file.<BR>
|
||||
Examples:
|
||||
<PRE>
|
||||
ins 'picture.raw'
|
||||
ins 'file',-256 insert last 256 bytes of file
|
||||
ins 'file',10,10 insert bytes 10..19 of file
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>RUN</B></TT> - generate run address
|
||||
<DD>The Atari executable program should have run address specified.
|
||||
A program may be loaded in many areas of memory and started from any address.
|
||||
<PRE> run addr
|
||||
</PRE>
|
||||
is equivalent to:
|
||||
<PRE> org $2e0
|
||||
dta a(addr)
|
||||
</PRE>
|
||||
Examples:
|
||||
<PRE> run start
|
||||
run program
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>INI</B></TT> - generate init address
|
||||
<DD>The Atari executable program may have some routines which are executed
|
||||
during loading process. There may be many init blocks in one file.<BR>
|
||||
Examples:
|
||||
<PRE> ini init
|
||||
ini showpic
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>ERT</B></TT> - generate error if expression is true
|
||||
<DD>Examples:
|
||||
<PRE> ert *>$c000
|
||||
ert len1>$ff||len2>$ff
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>IFT</B></TT> - assemble if expression is true<BR>
|
||||
<TT><B>ELS</B></TT> - else<BR>
|
||||
<TT><B>EIF</B></TT> - end if<BR>
|
||||
<DD>With these directives you can construct fragments which
|
||||
are assembled when a condition is met.
|
||||
Conditional constructions can be nested.<BR>
|
||||
Example:
|
||||
<PRE>noscr equ 1
|
||||
ift noscr
|
||||
lda #0
|
||||
els
|
||||
lda #$22
|
||||
eif
|
||||
sta $22f
|
||||
</PRE>
|
||||
Above example can be rewritten using line repeating feature:
|
||||
<PRE>noscr equ 1
|
||||
:noscr<>0 lda #0
|
||||
:noscr=0 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>
|
||||
<DL>
|
||||
<DT><TT><B>ADD</B></TT> - addition without carry
|
||||
<DD>If you 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>
|
||||
|
||||
<DT><TT><B>SUB</B></TT> - subtraction
|
||||
<DD>It is <TT>SEC</TT> and <TT>SBC</TT>.<P>
|
||||
|
||||
<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.
|
||||
They take no operand, because the branch target
|
||||
is the address of previously assembled instruction.<BR>
|
||||
Example:
|
||||
<PRE> ldx #0
|
||||
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:
|
||||
<PRE> ldx #0
|
||||
loop lda $500,x
|
||||
sta $600,x
|
||||
inx
|
||||
bne loop
|
||||
</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,
|
||||
because the target is the address of instruction following
|
||||
the next instruction.<BR>
|
||||
Example:
|
||||
<PRE> lda #40
|
||||
add:sta $80
|
||||
scc:inc $81
|
||||
</PRE>
|
||||
In the above example word 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>
|
||||
|
||||
<DT><TT><B>JCC, JCS, JEQ, JMI, JNE, JPL, JVC, JVS</B></TT> - conditional jumps
|
||||
<DD>They are a kind of 'long' branches. While standard branches
|
||||
(<TT>BNE, BEQ</TT>) have range of -128..+127, these jumps have range
|
||||
of all 64 kB.<BR>
|
||||
Example:
|
||||
<PRE> jne dest
|
||||
</PRE>is equivalent to:
|
||||
<PRE> seq:jmp dest
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>INW</B></TT> - increment word
|
||||
<DD>It is a 16-bit memory increment command.<BR>
|
||||
Example:
|
||||
<PRE> inw dest
|
||||
</PRE>is equivalent to:
|
||||
<PRE> inc dest
|
||||
sne:inc dest+1
|
||||
</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
|
||||
and substitutes two commands:
|
||||
<PRE> mva source dest = lda source : sta dest
|
||||
mvx source dest = ldx source : stx dest
|
||||
mvy source dest = ldy source : sty dest
|
||||
</PRE>
|
||||
|
||||
<DT><TT><B>MWA, MWX, MWY</B></TT> - move word using accumulator, X or Y
|
||||
<DD>They also 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>
|
||||
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:
|
||||
<PRE> mv* <immed dest
|
||||
mv* >immed dest+1
|
||||
</PRE>
|
||||
When <TT><immed</TT> equals <TT>>immed</TT> and <TT>immed</TT>
|
||||
is not forward-referenced, X-Asm uses optimization:
|
||||
<PRE> mv* <immed dest
|
||||
st* dest+1
|
||||
</PRE>
|
||||
</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
|
||||
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>
|
||||
|
||||
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>
|
||||
|
||||
Examples:
|
||||
<PRE>
|
||||
nop
|
||||
asl @
|
||||
lda >$1234 assembles to lda #$12
|
||||
lda $100,x
|
||||
lda a:0 generates 16-bit address
|
||||
jmp ($0a)
|
||||
lda ($80),y
|
||||
</PRE>
|
||||
|
||||
There are also pseudo addressing modes, which are similar to
|
||||
pseudo-commands. You may use them as 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
|
||||
cmd a,x- = cmd a,x : dex
|
||||
cmd a,y+ = cmd a,y : iny
|
||||
cmd a,y- = cmd a,y : dey
|
||||
cmd (z),y+ = cmd (z),y : iny
|
||||
cmd (z),y- = cmd (z),y : dey
|
||||
cmd (z,0) = ldx #0 : cmd (z,x)
|
||||
cmd (z),0 = ldy #0 : cmd (z),y
|
||||
<A NAME="new_adrmodes"> cmd (z),0+ = ldy #0 : cmd (z),y : iny
|
||||
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>
|
||||
<UL>
|
||||
<LI><B>Q:</B> Why does X-Asm ignore <TT>+2</TT> in following line?
|
||||
<PRE>label equ 1 +2
|
||||
</PRE>
|
||||
<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> What's wrong with <TT>asl a</TT> ?<P>
|
||||
<B>A:</B> You should use <TT>@</TT> for accumulator addressing mode.<P>
|
||||
|
||||
<LI><B>Q:</B> What's wrong in following line?
|
||||
<PRE>label: lda #0
|
||||
</PRE>
|
||||
<B>A:</B> Label definition can not include a colon.<P>
|
||||
|
||||
<LI><B>Q:</B> I wrote <TT>end start</TT>, where <TT>start</TT> points
|
||||
to program beginning, but program seems not to start there. Why?<P>
|
||||
<B>A:</B> You should have explicit run address specified.
|
||||
Use <TT>run start</TT> directive. <TT>end</TT> takes no operand.<P>
|
||||
|
||||
<LI><B>Q:</B> Why this construction does not work:
|
||||
<PRE>three equ one+two
|
||||
two equ one+one
|
||||
one equ 1
|
||||
</PRE>
|
||||
while this does:
|
||||
<PRE>
|
||||
two equ one+one
|
||||
one equ 1
|
||||
</PRE>
|
||||
<B>A:</B> X-Asm reads source twice (in pass 1 and pass 2)
|
||||
from the beginning until the end.<BR>
|
||||
This allows forward references, but not too complex.<BR>
|
||||
Keep in mind that assembler should know all the values in second pass.<P>
|
||||
Example:
|
||||
<PRE>two equ one+one This value is known in 2nd pass only
|
||||
one equ 1 This value is known as early as in 1st pass
|
||||
</PRE>
|
||||
These values can be fixed in two passes.<BR>
|
||||
If you insert following statement as first line:
|
||||
<PRE>three equ one+two
|
||||
</PRE>
|
||||
X-Asm will generate an error because it can't fix
|
||||
the value of <TT>three</TT> in second pass.<P>
|
||||
|
||||
<LI><B>Q:</B> X-Asm displayed single error while assembling my program.
|
||||
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>
|
||||
|
||||
<LI> If you have other questions/problems,
|
||||
<A HREF=mailto:pfusik@elka.pw.edu.pl>write to me</A>.
|
||||
</UL>
|
||||
</BODY>
|
||||
</HTML>
|
68
doc/xboot.htm
Normal file
68
doc/xboot.htm
Normal file
@ -0,0 +1,68 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>X-BOOT 4.0 Manual</TITLE>
|
||||
</HEAD>
|
||||
<BODY BACKGROUND="6502proc.gif">
|
||||
<CENTER>
|
||||
<H1>X-BOOT version 4.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
|
||||
you need no .ATR, try using <A HREF="xload.htm">X-LOAD</A>.
|
||||
<H3>CHANGES</H3>
|
||||
<H4>Version 4.0</H4>
|
||||
<UL>
|
||||
<LI> wildcards support - now you can convert a set of files
|
||||
<LI> .ATR name not required - name can be taken from executable
|
||||
<LI> no length limit - files longer than 60k allowed
|
||||
<LI> truncated executables handling
|
||||
<LI> checking for memory conflicts
|
||||
<LI> better errors handling
|
||||
</UL>
|
||||
<H4>Version 3.2</H4>
|
||||
<UL>
|
||||
<LI> .OBX is default extension of Atari executable
|
||||
</UL>
|
||||
<H4>Version 3.1</H4>
|
||||
<UL>
|
||||
<LI> first release
|
||||
</UL>
|
||||
|
||||
<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>
|
||||
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>
|
||||
Both loaders disable Atari Basic, so you needn't hold OPTION key while
|
||||
booting.<P>
|
||||
|
||||
<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 only run it by booting.<P>
|
||||
For more details, view 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
|
||||
additional block, which doesn't belong to executable file, but changes
|
||||
loader to run program instead of initializing.
|
||||
</BODY>
|
||||
</HTML>
|
64
doc/xbootpro.asx
Normal file
64
doc/xbootpro.asx
Normal file
@ -0,0 +1,64 @@
|
||||
* Boot executable file loader coded by Fox/Taquart
|
||||
* Reads file from ATR prepared with X-BOOT.
|
||||
* Professional version - can load file under ROM.
|
||||
* Interrupts and ROM are disabled when running loaded program.
|
||||
|
||||
opt h-
|
||||
org $480
|
||||
|
||||
bufr equ $400 128-byte buffer
|
||||
|
||||
tp equ $43 Temporary byte
|
||||
vc equ $44 Start and end vectors (4 bytes)
|
||||
|
||||
* Boot code
|
||||
boot dta b(0,1),a(boot,$e477) Boot header
|
||||
mva #0 $22f Make screen blank...
|
||||
mva #$52 $2c8 ... and pink ;)
|
||||
lda 20 Wait for VBLK
|
||||
cmp:req 20
|
||||
mwa #rts $2e0 Set default run vector
|
||||
dta b({lda a:0}) Skip two bytes
|
||||
secrts sec Return with error
|
||||
rts rts
|
||||
mva:pha >rts $2e3 Set init address...
|
||||
mva:pha <rts $2e2 ... and put return address on stack
|
||||
ldx #-5 Load header
|
||||
hput sta vc+4,x+ Store byte of header
|
||||
stx tp
|
||||
next inc bufx Increment buffer index
|
||||
bpl getx Branch if within buffer
|
||||
inw $30a Increment sector number
|
||||
mva #$ff ^31 Turn ROM on
|
||||
lsr ^4e Enable NMI interrupts
|
||||
cli Enable IRQ interrupts
|
||||
jsr $e453 Read sector
|
||||
bmi secrts Exit on error
|
||||
sei Disable IRQ interrupts
|
||||
inc ^4e Disable NMI interrupts
|
||||
dec ^31 Turn ROM off
|
||||
asl bufx Change $80 to $00
|
||||
getx lda bufr+$7f Get byte from buffer
|
||||
bufx equ *-2 Buffer index
|
||||
ldx tp Check if header or block data
|
||||
bne hput Branch to store header
|
||||
sta (vc,x) Store block data
|
||||
inw vc Increment vector
|
||||
lda vc+2 Check if end of block reached
|
||||
cmp vc
|
||||
lda vc+3
|
||||
sbc vc+1
|
||||
bcs next No: read next byte
|
||||
mva #3 ^2f Yes: Reset POKEY...
|
||||
init jmp ($2e2) ... and call init routine
|
||||
|
||||
dta c'4.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
|
||||
* It changes jmp ($2e2) to jmp ($2e0)
|
||||
opt h+
|
||||
org init+1
|
||||
dta l($2e0)
|
||||
|
||||
end
|
63
doc/xbootstd.asx
Normal file
63
doc/xbootstd.asx
Normal file
@ -0,0 +1,63 @@
|
||||
* Boot executable file loader coded by Fox/Taquart
|
||||
* Reads file from ATR prepared with X-BOOT.
|
||||
* Standard loader - ROM and interrupts enabled.
|
||||
|
||||
opt h-
|
||||
org $780
|
||||
|
||||
bufr equ $700 128-byte buffer
|
||||
|
||||
tp equ $43 Temporary byte
|
||||
vc equ $44 Start and end vectors (4 bytes)
|
||||
|
||||
* Boot code
|
||||
boot dta b(0,1),a(boot,$e477) Boot header
|
||||
txtpos equ 215
|
||||
ldy #txtpos Print text
|
||||
print mva text-txtpos,y ($58),y+
|
||||
cpy #txtpos+txtlen
|
||||
bcc print
|
||||
mwa #rts $2e0 Set default run vector
|
||||
mva >bufr $305 Set buffer address
|
||||
mva #$ff ^31 Turn BASIC off
|
||||
dta b({lda a:0}) Skip two bytes
|
||||
secrts sec Return with error
|
||||
rts rts
|
||||
mva:pha >rts $2e3 Set init address...
|
||||
mva:pha <rts $2e2 ... and put return address on stack
|
||||
ldx #-5 Load header
|
||||
hput sta vc+4,x+ Store byte of header
|
||||
stx tp
|
||||
next inc bufx Increment buffer index
|
||||
bpl getx Branch if within buffer
|
||||
inw $30a Increment sector number
|
||||
jsr $e453 Read sector
|
||||
bmi secrts Exit on error
|
||||
asl bufx Change $80 to $00
|
||||
getx lda bufr+$7f Get byte from buffer
|
||||
bufx equ *-2 Buffer index
|
||||
ldx tp Check if header or block data
|
||||
bne hput Branch to store header
|
||||
sta (vc,x) Store block data
|
||||
inw vc Increment vector
|
||||
lda vc+2 Check if end of block reached
|
||||
cmp vc
|
||||
lda vc+3
|
||||
sbc vc+1
|
||||