<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>243</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>246</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>243</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>246</b><br />
<?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%3ASaving_a_file</id>
		<title>Programming:Saving a file - 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%3ASaving_a_file"/>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Saving_a_file&amp;action=history"/>
		<updated>2026-08-28T23:01:40Z</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:Saving_a_file&amp;diff=15009&amp;oldid=prev</id>
		<title>CPCLER at 20:32, 13 March 2007</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Saving_a_file&amp;diff=15009&amp;oldid=prev"/>
				<updated>2007-03-13T20:32:59Z</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 20:32, 13 March 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L66&quot; &gt;Line 66:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 66:&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;.end_filename&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;.end_filename&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:14909:newid:15009 --&gt;
&lt;/table&gt;</summary>
		<author><name>CPCLER</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Saving_a_file&amp;diff=14909&amp;oldid=prev</id>
		<title>CPCLER at 22:50, 12 March 2007</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Saving_a_file&amp;diff=14909&amp;oldid=prev"/>
				<updated>2007-03-12T22:50:11Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This example shows the firmware functions used to save&lt;br /&gt;
;; a file.&lt;br /&gt;
;;&lt;br /&gt;
;; in this example, the file is called SCREEN.SCR&lt;br /&gt;
;; and is a dump of the screen (from the default location &amp;amp;c000-&amp;amp;ffff)&lt;br /&gt;
&lt;br /&gt;
;; firmware function to open a file for writing&lt;br /&gt;
.cas_out_open equ &amp;amp;bc8c&lt;br /&gt;
;; firmware function to write an entire file&lt;br /&gt;
;; the file will be written with a AMSDOS header&lt;br /&gt;
.cas_out_direct equ &amp;amp;bc98&lt;br /&gt;
;; firmware function to close a file opened for writing&lt;br /&gt;
.cas_out_close equ &amp;amp;bc8f&lt;br /&gt;
&lt;br /&gt;
org &amp;amp;4000&lt;br /&gt;
&lt;br /&gt;
call save_file&lt;br /&gt;
ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.save_file&lt;br /&gt;
;; B = length of the filename in characters&lt;br /&gt;
ld b,end_filename-filename&lt;br /&gt;
&lt;br /&gt;
;; HL = address of the start of the filename&lt;br /&gt;
ld hl,filename&lt;br /&gt;
&lt;br /&gt;
;; DE = address of a 2k buffer&lt;br /&gt;
;; &lt;br /&gt;
;; in disc mode: this buffer is not used when CAS IN DIRECT&lt;br /&gt;
;; firmware function is used, so it is safe to put it anywhere&lt;br /&gt;
;; you want.&lt;br /&gt;
ld de,0&lt;br /&gt;
&lt;br /&gt;
;; firmware function to open a file for reading&lt;br /&gt;
call cas_out_open&lt;br /&gt;
&lt;br /&gt;
;; firmware function to write the entire file&lt;br /&gt;
;; this will automatically generate a AMSDOS header&lt;br /&gt;
;; and write it before the the file data.&lt;br /&gt;
&lt;br /&gt;
;; HL = load address&lt;br /&gt;
ld hl,&amp;amp;c000&lt;br /&gt;
;; DE = length&lt;br /&gt;
ld de,&amp;amp;4000&lt;br /&gt;
;; BC = execution address&lt;br /&gt;
ld bc,&amp;amp;0000&lt;br /&gt;
;; A = file type (2 = binary)&lt;br /&gt;
ld a,2&lt;br /&gt;
&lt;br /&gt;
;; write file&lt;br /&gt;
call cas_out_direct&lt;br /&gt;
&lt;br /&gt;
;; firmware function to close a file opened for writing&lt;br /&gt;
call cas_out_close&lt;br /&gt;
&lt;br /&gt;
ret&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;; the filename to save&lt;br /&gt;
;; disc filenames are a maximum of 12 characters long&lt;br /&gt;
;; 8 characters for name, and 3 characters for extension&lt;br /&gt;
.filename&lt;br /&gt;
defb &amp;quot;SCREEN.SCR&amp;quot;&lt;br /&gt;
.end_filename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>CPCLER</name></author>	</entry>

	</feed>