<?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%3ACalling_a_RSX_from_outside_of_BASIC</id>
		<title>Programming:Calling a RSX from outside of BASIC - 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%3ACalling_a_RSX_from_outside_of_BASIC"/>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Calling_a_RSX_from_outside_of_BASIC&amp;action=history"/>
		<updated>2026-08-28T14:58:27Z</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:Calling_a_RSX_from_outside_of_BASIC&amp;diff=15010&amp;oldid=prev</id>
		<title>CPCLER at 20:33, 13 March 2007</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Calling_a_RSX_from_outside_of_BASIC&amp;diff=15010&amp;oldid=prev"/>
				<updated>2007-03-13T20:33:24Z</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:33, 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;L117&quot; &gt;Line 117:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 117:&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_new_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_new_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:14910:newid:15010 --&gt;
&lt;/table&gt;</summary>
		<author><name>CPCLER</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Calling_a_RSX_from_outside_of_BASIC&amp;diff=14910&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:Calling_a_RSX_from_outside_of_BASIC&amp;diff=14910&amp;oldid=prev"/>
				<updated>2007-03-12T22:50:54Z</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 will show how to execute a RSX command with parameters&lt;br /&gt;
;; outside BASIC.&lt;br /&gt;
;;&lt;br /&gt;
;;&lt;br /&gt;
;; e.g. &lt;br /&gt;
;;&lt;br /&gt;
;; |REN,&amp;quot;&amp;lt;new filename&amp;gt;,&amp;quot;&amp;lt;old filename&amp;gt;&amp;quot;&lt;br /&gt;
;;&lt;br /&gt;
;; Steps:&lt;br /&gt;
;; 1. Find RSX command and store information to access it (address of function&lt;br /&gt;
;;    and &amp;quot;rom select&amp;quot;)&lt;br /&gt;
;; 2. Initialise parameter buffer (pointed to by IX register), and number of parameters (in A register)&lt;br /&gt;
;; 3. Execute command.&lt;br /&gt;
&lt;br /&gt;
org &amp;amp;8000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;; firmware function to find a RSX command by name&lt;br /&gt;
.kl_find_command equ &amp;amp;bcd4&lt;br /&gt;
&lt;br /&gt;
;;----------------------------------------------------------------&lt;br /&gt;
;; STEP 1: Find &amp;quot;REN&amp;quot; command, store access information&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ld hl,cmd_ren&lt;br /&gt;
call kl_find_command&lt;br /&gt;
ret nc&lt;br /&gt;
&lt;br /&gt;
ld (ren_command),hl	;; store address of function&lt;br /&gt;
ld a,c&lt;br /&gt;
ld (ren_command+2),a	;; store &amp;quot;rom select&amp;quot; of function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;;----------------------------------------------------------------&lt;br /&gt;
;; STEP 2: Initialise parameter buffer and number of parameters&lt;br /&gt;
&lt;br /&gt;
ld ix,parameter_buffer	;; pointer to start of parameter buffer&lt;br /&gt;
ld a,2			;; number of parameters&lt;br /&gt;
&lt;br /&gt;
;; store address of string descriptor block for old filename (2nd parameter)&lt;br /&gt;
ld hl,sdb_old_filename&lt;br /&gt;
ld (ix+0),l&lt;br /&gt;
ld (ix+1),h&lt;br /&gt;
&lt;br /&gt;
;; store address of string descriptor block for new filename (1st parameter)&lt;br /&gt;
ld hl,sdb_new_filename&lt;br /&gt;
ld (ix+2),l&lt;br /&gt;
ld (ix+3),h&lt;br /&gt;
&lt;br /&gt;
;;----------------------------------------------------------------&lt;br /&gt;
;; STEP 3: Execute REN command with parameters&lt;br /&gt;
&lt;br /&gt;
rst 3			;; KL FAR CALL&lt;br /&gt;
defw ren_command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;;----------------------------------------------------------------&lt;br /&gt;
ret&lt;br /&gt;
&lt;br /&gt;
;;-------------------------------------------------------------&lt;br /&gt;
;; This is initialised if the &amp;quot;REN&amp;quot; command is found.&lt;br /&gt;
;; this data is used to access command via &amp;quot;RST 3: KL FAR CALL&amp;quot;&lt;br /&gt;
&lt;br /&gt;
.ren_command&lt;br /&gt;
defw 0			;; address of function&lt;br /&gt;
defb 0			;; &amp;quot;rom select&amp;quot; to access function&lt;br /&gt;
&lt;br /&gt;
;;-------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
;; the name of the function &lt;br /&gt;
;; - AMSDOS command &amp;quot;REN&amp;quot; (rename a file)&lt;br /&gt;
.cmd_ren&lt;br /&gt;
defb &amp;quot;RE&amp;quot;,&amp;quot;N&amp;quot;+&amp;amp;80&lt;br /&gt;
&lt;br /&gt;
;;-------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
;; the parameter buffer:&lt;br /&gt;
;; - 2 bytes per parameter:&lt;br /&gt;
;;   integer constant: the constant&lt;br /&gt;
;;   integer variable: address of 2-byte integer variable&lt;br /&gt;
;;   string: address of string descriptor block&lt;br /&gt;
;;   real: address of 5-byte real number&lt;br /&gt;
&lt;br /&gt;
;; - parameters are stored in reverse order (last parameter is first&lt;br /&gt;
;; in the buffer, first parameter is last in the buffer)&lt;br /&gt;
&lt;br /&gt;
.parameter_buffer&lt;br /&gt;
defs 4			;; space for 2 parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;;-------------------------------------------------------------&lt;br /&gt;
;; the string descriptor blocks for the parameters&lt;br /&gt;
&lt;br /&gt;
;; string descriptor block for old filename&lt;br /&gt;
.sdb_old_filename&lt;br /&gt;
defb end_old_filename-old_filename		;; length of string&lt;br /&gt;
defw old_filename				;; address of string&lt;br /&gt;
&lt;br /&gt;
;; string descriptor block for new filename&lt;br /&gt;
.sdb_new_filename&lt;br /&gt;
defb end_new_filename-new_filename		;; length of string&lt;br /&gt;
defw new_filename				;; address of string&lt;br /&gt;
&lt;br /&gt;
;;-------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
;; the old filename&lt;br /&gt;
.old_filename&lt;br /&gt;
defb &amp;quot;SCREEN.BIN&amp;quot;&lt;br /&gt;
.end_old_filename&lt;br /&gt;
&lt;br /&gt;
;; the new filename&lt;br /&gt;
.new_filename&lt;br /&gt;
defb &amp;quot;SCREEN.SCR&amp;quot;&lt;br /&gt;
.end_new_filename&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>CPCLER</name></author>	</entry>

	</feed>