<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.amstrad-cpc.net/index.php?action=history&amp;feed=atom&amp;title=BIOS_Cassette_%28or_Diskette%29_Functions</id>
	<title>BIOS Cassette (or Diskette) Functions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.amstrad-cpc.net/index.php?action=history&amp;feed=atom&amp;title=BIOS_Cassette_%28or_Diskette%29_Functions"/>
	<link rel="alternate" type="text/html" href="https://wiki.amstrad-cpc.net/index.php?title=BIOS_Cassette_(or_Diskette)_Functions&amp;action=history"/>
	<updated>2026-09-04T09:03:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wiki.amstrad-cpc.net/index.php?title=BIOS_Cassette_(or_Diskette)_Functions&amp;diff=63373&amp;oldid=prev</id>
		<title>MacDeath at 16:39, 19 December 2010</title>
		<link rel="alternate" type="text/html" href="https://wiki.amstrad-cpc.net/index.php?title=BIOS_Cassette_(or_Diskette)_Functions&amp;diff=63373&amp;oldid=prev"/>
		<updated>2010-12-19T16:39:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:39, 19 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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:BIOS]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Cassette Init ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Cassette Init ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   BC65 CAS_INITIALIZE&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   BC65 CAS_INITIALIZE&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MacDeath</name></author>
	</entry>
	<entry>
		<id>https://wiki.amstrad-cpc.net/index.php?title=BIOS_Cassette_(or_Diskette)_Functions&amp;diff=63372&amp;oldid=prev</id>
		<title>Nocash: Created page with &#039;== Cassette Init ==   BC65 CAS_INITIALIZE   BC68 CAS_SET_SPEED     ;in: HL=upper16bit, A=lower8bit   BC6B CAS_NOISY         ;in: A=output &quot;Press PLAY&quot; messages (0=yes, &gt;0=no)  ==…&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.amstrad-cpc.net/index.php?title=BIOS_Cassette_(or_Diskette)_Functions&amp;diff=63372&amp;oldid=prev"/>
		<updated>2010-01-24T22:02:26Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;== Cassette Init ==   BC65 CAS_INITIALIZE   BC68 CAS_SET_SPEED     ;in: HL=upper16bit, A=lower8bit   BC6B CAS_NOISY         ;in: A=output &amp;quot;Press PLAY&amp;quot; messages (0=yes, &amp;gt;0=no)  ==…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Cassette Init ==&lt;br /&gt;
  BC65 CAS_INITIALIZE&lt;br /&gt;
  BC68 CAS_SET_SPEED     ;in: HL=upper16bit, A=lower8bit&lt;br /&gt;
  BC6B CAS_NOISY         ;in: A=output &amp;quot;Press PLAY&amp;quot; messages (0=yes, &amp;gt;0=no)&lt;br /&gt;
&lt;br /&gt;
== Cassette (or Diskette) Input ==&lt;br /&gt;
  BC77 CAS_IN_OPEN       ;in: HL=fname, B=fnamelen, DE=workbuf,&lt;br /&gt;
                         ;out: HL=header, DE=dest, BC=siz, A=type, cy=err, zf&lt;br /&gt;
  BC7A CAS_IN_CLOSE      ;out: DE=workbuf, cy=0=failed (no open file)&lt;br /&gt;
  BC7D CAS_IN_ABANDON    ;out: DE=workbuf, cy=1, z=0, A=all_closed (FFh=yes)&lt;br /&gt;
  BC80 CAS_IN_CHAR       ;out: A=char, cy=0=error, zf=errtype&lt;br /&gt;
  BC83 CAS_IN_DIRECT     ;in: HL=dest, out: HL=entrypoint, cy=0=err, zf=errtype&lt;br /&gt;
  BC86 CAS_RETURN        ;in: A=char (undo CAS_IN_CHAR, char back to buffer)&lt;br /&gt;
  BC89 CAS_TEST_EOF      ;out: CY=0=eof (end of file)&lt;br /&gt;
&lt;br /&gt;
== Cassette (or Diskette) Output ==&lt;br /&gt;
&lt;br /&gt;
  BC8C CAS_OUT_OPEN      ;in: HL=fname, B=fnamelen, DE=workbuf, out: HL,cy,zf&lt;br /&gt;
  BC8F CAS_OUT_CLOSE     ;out: DE=workbuf, cy=0=failed (zf=errtype)&lt;br /&gt;
  BC92 CAS_OUT_ABANDON   ;out: DE=workbuf, cy=1, z=0, A=all_closed (FFh=yes)&lt;br /&gt;
  BC95 CAS_OUT_CHAR      ;in: A=char, out: cy=0=error, zf=errtype&lt;br /&gt;
  BC98 CAS_OUT_DIRECT    ;in: HL=src, DE=len, BC=entrypoint, A=type, out: cy/zf&lt;br /&gt;
&lt;br /&gt;
== Cassette (or Diskette) Catalog ==&lt;br /&gt;
  BC9B CAS_CATALOG       ;in: DE=workbuf, out: DE=workbuf, cy=0=error&lt;br /&gt;
&lt;br /&gt;
== Cassette Single Block Access &amp;amp; Motor Control ==&lt;br /&gt;
  BC9E CAS_WRITE         ;in: HL=src, DE=len, A=ID(2Ch=header, 16h=data), out?&lt;br /&gt;
  BCA1 CAS_READ          ;in: HL=dest, DE=len, A=ID(2Ch=header, 16h=data), out?&lt;br /&gt;
  BCA4 CAS_CHECK         ;in: HL=src, DE=len, A=ID(2Ch=header, 16h=data), out?&lt;br /&gt;
  BC6E CAS_START_MOTOR   ;out: A.bit4 old motor status (0=off, 1=on), cy=0, z=1&lt;br /&gt;
  BC71 CAS_STOP_MOTOR    ;out: A.bit4 old motor status (0=off, 1=on), cy=0, z=1&lt;br /&gt;
  BC74 CAS_RESTORE_MOTOR ;in: A.bit4 new motor status (0=off, 1=on), cy=0, z=1&lt;br /&gt;
&lt;br /&gt;
== Machine Pack Boot Program ==&lt;br /&gt;
  BD13 MC_BOOT_PROGRAM    ;in: HL=loader_callback, out: starts program&lt;br /&gt;
Loads and starts a BINARY program, typically used when typing RUN&amp;quot;filename.bin&amp;quot; under BASIC. The callback should load the program from whatever source (CAS, DISK, or elsewhere), and should then return CY=1=okay &amp;amp; HL=entrypoint (or HL=0000h to reboot the BASIC ROM), or CY=0=failed.&lt;br /&gt;
If the callback returns CY=1 then the program (or BASIC ROM) is started via MC_START_PROGRAM, otherwise, when CY=0, &amp;quot;*** PROGRAM LOAD FAILED ***&amp;quot; is displayed, and the OS (ie. typically BASIC) is restarted.&lt;br /&gt;
&lt;br /&gt;
== Machine Pack Start Program ==&lt;br /&gt;
  BD16 MC_START_PROGRAM   ;in: HL=entrypoint (0000h=BASIC), C=ROMcfg&lt;br /&gt;
Starts a BINARY program, typically used when typing RUN&amp;quot;filename.bin&amp;quot; under BASIC (expecting that the file is already loaded into memory). The function resets all BIOS memory, sets SP=C000h, DE=LORAM=0040h, HL=BAS_HIRAM=ABFFh, BC=BIN_HIRAM=B0FFh, and does then call the entrypoint (incoming C:HL) via RST 18h, if incoming HL was zero then it calls 0:C006h (ie. reboots the BASIC ROM).&lt;br /&gt;
Observe that the program is started with only the raw BIOS initialized; but without extensions like AMSDOS. To install them (if needed), the entrypoint function should set HL=BC (to deallocate BASIC RAM), then call KL_ROM_WALK (to install all extension ROMs) or, set C=07h and call KL_INIT_BACK (to install only AMSDOS).&lt;/div&gt;</summary>
		<author><name>Nocash</name></author>
	</entry>
</feed>