<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://oldwiki.cpcwiki.eu/index.php?action=history&amp;feed=atom&amp;title=Programming%3ARead%2FWrite_a_file_quickly_byte-by-byte</id>
		<title>Programming:Read/Write a file quickly byte-by-byte - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://oldwiki.cpcwiki.eu/index.php?action=history&amp;feed=atom&amp;title=Programming%3ARead%2FWrite_a_file_quickly_byte-by-byte"/>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Read/Write_a_file_quickly_byte-by-byte&amp;action=history"/>
		<updated>2026-08-28T09:31:32Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Read/Write_a_file_quickly_byte-by-byte&amp;diff=101951&amp;oldid=prev</id>
		<title>Ikonsgr at 08:15, 7 July 2018</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Read/Write_a_file_quickly_byte-by-byte&amp;diff=101951&amp;oldid=prev"/>
				<updated>2018-07-07T08:15:09Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:15, 7 July 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L61&quot; &gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;LD (&amp;amp;7000),HL;;&amp;amp;7000=REMAINING BYTES TO READ&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;LD (&amp;amp;7000),HL;;&amp;amp;7000=REMAINING BYTES TO READ&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;;CAS_IN_CHAR FILLS THE 2K.BUFFER&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;,&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;;CAS_IN_CHAR &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;READS FILE&amp;#160; AND &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;;;SET SYSTEM VARIABLES &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;;;&lt;/ins&gt;FILLS THE 2K.BUFFER&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;.READ_2K&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;.READ_2K&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CALL CAS_IN_CHAR&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CALL CAS_IN_CHAR&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:101950:newid:101951 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ikonsgr</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Read/Write_a_file_quickly_byte-by-byte&amp;diff=101950&amp;oldid=prev</id>
		<title>CPM User at 07:39, 7 July 2018</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Read/Write_a_file_quickly_byte-by-byte&amp;diff=101950&amp;oldid=prev"/>
				<updated>2018-07-07T07:39:45Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 07:39, 7 July 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L202&quot; &gt;Line 202:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 202:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;.TWO_K_BUFFER DEFS 2048&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;.TWO_K_BUFFER DEFS 2048&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Programming]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:101949:newid:101950 --&gt;
&lt;/table&gt;</summary>
		<author><name>CPM User</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Read/Write_a_file_quickly_byte-by-byte&amp;diff=101949&amp;oldid=prev</id>
		<title>CPM User: Created page with &quot;Routine by  ikonsgr  &lt;pre&gt; ;;This is an example of ;;Read/Write a file Byte by Byte ;;Using firmware, BUT MUCH FASTER! ;;File must have header,named &quot;test.bin&quot;  ;;And don't be...&quot;</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Read/Write_a_file_quickly_byte-by-byte&amp;diff=101949&amp;oldid=prev"/>
				<updated>2018-07-07T07:32:55Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Routine by  ikonsgr  &amp;lt;pre&amp;gt; ;;This is an example of ;;Read/Write a file Byte by Byte ;;Using firmware, BUT MUCH FASTER! ;;File must have header,named &amp;quot;test.bin&amp;quot;  ;;And don&amp;#039;t be...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Routine by  ikonsgr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;;This is an example of&lt;br /&gt;
;;Read/Write a file Byte by Byte&lt;br /&gt;
;;Using firmware, BUT MUCH FASTER!&lt;br /&gt;
;;File must have header,named &amp;quot;test.bin&amp;quot; &lt;br /&gt;
;;And don't be more than 10K.&lt;br /&gt;
;;Use MAXAM to assemble&lt;br /&gt;
;;load&amp;quot;Fastcopy&amp;quot;,&amp;amp;4000:call &amp;amp;4000 to run&lt;br /&gt;
&lt;br /&gt;
.CAS_OUT_OPEN EQU &amp;amp;BC8C&lt;br /&gt;
.CAS_OUT_CHAR EQU &amp;amp;BC95&lt;br /&gt;
.CAS_OUT_CLOSE EQU &amp;amp;BC8F&lt;br /&gt;
.CAS_IN_OPEN EQU &amp;amp;BC77&lt;br /&gt;
.CAS_IN_CHAR EQU &amp;amp;BC80&lt;br /&gt;
.CAS_IN_CLOSE EQU &amp;amp;BC7A&lt;br /&gt;
&lt;br /&gt;
ORG &amp;amp;4000&lt;br /&gt;
NOLIST&lt;br /&gt;
write&amp;quot;FASTCOPY.BIN&amp;quot;&lt;br /&gt;
&lt;br /&gt;
LD B,END_FLNAME-FLNAME&lt;br /&gt;
LD HL,FLNAME&lt;br /&gt;
LD DE,TWO_K_BUFFER&lt;br /&gt;
CALL CAS_IN_OPEN&lt;br /&gt;
&lt;br /&gt;
DEC HL&lt;br /&gt;
DEC HL&lt;br /&gt;
PUSH HL&lt;br /&gt;
POP IY ;;IY=ADDR OF 2KBUF CURRENT POSITION&lt;br /&gt;
PUSH BC ;;BC=DATASIZE OF FILE&lt;br /&gt;
&lt;br /&gt;
;;FIND ADDR FOR 128BYTES OF HEADER &lt;br /&gt;
;;THIS METHOD COPIES THE ENTIRE 128Byte&lt;br /&gt;
;;OF HEADER,AND NOT ONLY FIRST &amp;amp;45 BYTES&lt;br /&gt;
LD HL,(&amp;amp;be7d)&lt;br /&gt;
LD BC,&amp;amp;e4&lt;br /&gt;
ADD HL,BC ;; HL = start of header    &lt;br /&gt;
;;COPY HEADER TO RAM BUFFER&lt;br /&gt;
LD BC,&amp;amp;8000&lt;br /&gt;
LD D,0&lt;br /&gt;
.HEAD_LOOP&lt;br /&gt;
LD A,128&lt;br /&gt;
CP D&lt;br /&gt;
JP Z,HEAD_EXIT&lt;br /&gt;
LD A,(HL)&lt;br /&gt;
LD (BC),A&lt;br /&gt;
INC HL&lt;br /&gt;
INC D&lt;br /&gt;
INC BC&lt;br /&gt;
JP HEAD_LOOP&lt;br /&gt;
.HEAD_EXIT&lt;br /&gt;
;;SAVE FILE SIZE TO &amp;amp;7002,&lt;br /&gt;
;;START ADDR OF READED FILE TO MEMORY &amp;amp;8000&lt;br /&gt;
POP HL &lt;br /&gt;
LD (&amp;amp;7002),HL&lt;br /&gt;
DEC HL&lt;br /&gt;
PUSH HL&lt;br /&gt;
LD HL,&amp;amp;8080&lt;br /&gt;
LD (&amp;amp;7000),HL;;&amp;amp;7000=REMAINING BYTES TO READ&lt;br /&gt;
&lt;br /&gt;
;;CAS_IN_CHAR FILLS THE 2K.BUFFER,&lt;br /&gt;
;;SET SYSTEM VARIABLES &lt;br /&gt;
.READ_2K&lt;br /&gt;
CALL CAS_IN_CHAR&lt;br /&gt;
LD (HL),A&lt;br /&gt;
INC HL&lt;br /&gt;
LD (&amp;amp;7000),HL&lt;br /&gt;
PUSH IY&lt;br /&gt;
POP HL&lt;br /&gt;
LD E,(HL)&lt;br /&gt;
INC HL&lt;br /&gt;
LD D,(HL)&lt;br /&gt;
LD BC,2047&lt;br /&gt;
&lt;br /&gt;
;;LOOP FOR READING THE HOLE BUFFER&lt;br /&gt;
.READ_BYTE&lt;br /&gt;
;;COPY CURRENT BYTE TO RAM BUFFER&lt;br /&gt;
LD HL,(&amp;amp;7000)&lt;br /&gt;
LD A,(DE)&lt;br /&gt;
LD (HL),A&lt;br /&gt;
INC DE&lt;br /&gt;
INC HL&lt;br /&gt;
LD (&amp;amp;7000),HL&lt;br /&gt;
POP HL&lt;br /&gt;
DEC HL&lt;br /&gt;
LD A,H;;CHECK IF ALL DATA READED&lt;br /&gt;
OR L&lt;br /&gt;
JR Z,CLOSE_FILE&lt;br /&gt;
&lt;br /&gt;
;;CHECK IF 2K.BUFFER IS FULL&lt;br /&gt;
LD A,B&lt;br /&gt;
OR C&lt;br /&gt;
JR Z,NEXT_2K&lt;br /&gt;
PUSH HL&lt;br /&gt;
JR READ_BYTE&lt;br /&gt;
&lt;br /&gt;
.NEXT_2K&lt;br /&gt;
;;SET SYTEM'S ADDR OF CURRENT BYTE &lt;br /&gt;
;;READED FROM FILE&lt;br /&gt;
LD (IY+0),E&lt;br /&gt;
LD (IY+1),D&lt;br /&gt;
;;ADDR OF DATA RECORDS TO BE READ&lt;br /&gt;
;;IS SET TO ZERO &lt;br /&gt;
XOR A&lt;br /&gt;
LD (IY+21),A&lt;br /&gt;
LD (IY+22),A&lt;br /&gt;
JR READ_2K&lt;br /&gt;
&lt;br /&gt;
.CLOSE_FILE&lt;br /&gt;
CALL CAS_IN_CLOSE&lt;br /&gt;
&lt;br /&gt;
;;NOW FASTWRITE THE RAMBUFFER TO FILE&lt;br /&gt;
&lt;br /&gt;
LD HL,(&amp;amp;7002);;READ FILE SIZE FROM &amp;amp;7002&lt;br /&gt;
;;ADD HEADER TO FILE'S DATASIZE &lt;br /&gt;
LD BC,128&lt;br /&gt;
ADD HL,BC &lt;br /&gt;
DEC HL&lt;br /&gt;
LD (&amp;amp;7002),HL&lt;br /&gt;
&lt;br /&gt;
LD B,END_FWNAME-FWNAME&lt;br /&gt;
LD HL,FWNAME&lt;br /&gt;
LD DE,TWO_K_BUFFER&lt;br /&gt;
CALL CAS_OUT_OPEN&lt;br /&gt;
DEC HL&lt;br /&gt;
DEC HL&lt;br /&gt;
PUSH HL&lt;br /&gt;
POP IY ;;IY=ADDR.OF.CUR.POS.2KBUF &lt;br /&gt;
LD HL,&amp;amp;8000&lt;br /&gt;
LD A,(HL)&lt;br /&gt;
&lt;br /&gt;
;;CAS_OUT_CHAR FILLS THE 2K.BUFFER,&lt;br /&gt;
;;SET SYSTEM VARIABLES &lt;br /&gt;
.WRITE_2K&lt;br /&gt;
CALL CAS_OUT_CHAR&lt;br /&gt;
INC HL&lt;br /&gt;
PUSH HL&lt;br /&gt;
PUSH IY&lt;br /&gt;
POP HL&lt;br /&gt;
LD E,(HL)&lt;br /&gt;
INC HL&lt;br /&gt;
LD D,(HL)&lt;br /&gt;
LD BC,2047&lt;br /&gt;
POP HL&lt;br /&gt;
&lt;br /&gt;
;;LOOP FOR WRITING THE HOLE BUFFER&lt;br /&gt;
.WRITE_BYTE&lt;br /&gt;
LD A,(HL)&lt;br /&gt;
LD (DE),A&lt;br /&gt;
DEC BC&lt;br /&gt;
INC DE&lt;br /&gt;
INC HL&lt;br /&gt;
PUSH HL&lt;br /&gt;
LD HL,(&amp;amp;7002)&lt;br /&gt;
DEC HL&lt;br /&gt;
LD A,H;;;;CHECK IF ALL DATA WRITEN&lt;br /&gt;
OR L&lt;br /&gt;
JR Z,CLOSE_WFILE&lt;br /&gt;
&lt;br /&gt;
;;CHECK IF 2K.BUFFER IS FULL&lt;br /&gt;
LD (&amp;amp;7002),HL&lt;br /&gt;
LD A,B&lt;br /&gt;
OR C&lt;br /&gt;
JR Z,NEXT_W2K&lt;br /&gt;
POP HL&lt;br /&gt;
JR WRITE_BYTE&lt;br /&gt;
&lt;br /&gt;
.NEXT_W2K&lt;br /&gt;
LD (IY+0),E&lt;br /&gt;
LD (IY+1),D&lt;br /&gt;
LD A,0&lt;br /&gt;
LD (IY+21),A&lt;br /&gt;
LD A,&amp;amp;08&lt;br /&gt;
LD (IY+22),A&lt;br /&gt;
POP HL&lt;br /&gt;
JR WRITE_2K&lt;br /&gt;
&lt;br /&gt;
.CLOSE_WFILE&lt;br /&gt;
LD HL,2048&lt;br /&gt;
SCF&lt;br /&gt;
CCF&lt;br /&gt;
SBC HL,BC&lt;br /&gt;
LD (IY+21),L&lt;br /&gt;
LD (IY+22),H&lt;br /&gt;
LD (IY+0),E&lt;br /&gt;
LD (IY+1),D&lt;br /&gt;
CALL CAS_OUT_CLOSE&lt;br /&gt;
RET&lt;br /&gt;
&lt;br /&gt;
;;FILENAME TO READ&lt;br /&gt;
.FLNAME&lt;br /&gt;
DEFB &amp;quot;TEST.BIN&amp;quot;&lt;br /&gt;
.END_FLNAME&lt;br /&gt;
&lt;br /&gt;
;;FILENAME TO WRITE&lt;br /&gt;
.FWNAME&lt;br /&gt;
DEFB &amp;quot;FILECOPY.BIN&amp;quot;&lt;br /&gt;
.END_FWNAME&lt;br /&gt;
&lt;br /&gt;
.TWO_K_BUFFER DEFS 2048&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>CPM User</name></author>	</entry>

	</feed>