<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.intellivision.us/index.php?action=history&amp;feed=atom&amp;title=Dseg.mac</id>
		<title>Dseg.mac - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.intellivision.us/index.php?action=history&amp;feed=atom&amp;title=Dseg.mac"/>
		<link rel="alternate" type="text/html" href="http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;action=history"/>
		<updated>2026-08-19T23:45:52Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=14783&amp;oldid=prev</id>
		<title>Mr z: Protected &quot;Dseg.mac&quot; ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))</title>
		<link rel="alternate" type="text/html" href="http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=14783&amp;oldid=prev"/>
				<updated>2010-12-04T08:20:07Z</updated>
		
		<summary type="html">&lt;p&gt;Protected &amp;quot;&lt;a href=&quot;/index.php/Dseg.mac&quot; title=&quot;Dseg.mac&quot;&gt;Dseg.mac&lt;/a&gt;&amp;quot; ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:20, 4 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Mr z</name></author>	</entry>

	<entry>
		<id>http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=3048&amp;oldid=prev</id>
		<title>Mr z at 15:08, 16 September 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=3048&amp;oldid=prev"/>
				<updated>2008-09-16T15:08:08Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&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 style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:08, 16 September 2008&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 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;[[Category:Programming]] [[Category:Library]]&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;[[Category:Programming]] [[Category:Library]]&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;NOTE:&amp;#160; This file has been superseded by [[cart.mac]].&amp;#160; You should consider using &amp;lt;CODE&amp;gt;cart.mac&amp;lt;/CODE&amp;gt; instead of this file.&lt;/ins&gt;&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;&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;= Functions Provided =&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;= Functions Provided =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mr z</name></author>	</entry>

	<entry>
		<id>http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=2969&amp;oldid=prev</id>
		<title>Mr z: /* Functions Provided */</title>
		<link rel="alternate" type="text/html" href="http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=2969&amp;oldid=prev"/>
				<updated>2008-09-07T04:42:12Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Functions Provided&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&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 style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 04:42, 7 September 2008&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-l7&quot; &gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&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;TR&amp;gt;&amp;lt;TD&amp;gt;&amp;lt;I&amp;gt;label&amp;lt;/I&amp;gt; SYSTEM &amp;lt;I&amp;gt;len&amp;lt;/I&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate &amp;lt;I&amp;gt;len&amp;lt;/I&amp;gt; storage locations in 16-bit [[System RAM]], assigning the address to &amp;lt;I&amp;gt;label&amp;lt;/I&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 16-bit memory from $2F0 - $35F.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;/CENTER&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;TR&amp;gt;&amp;lt;TD&amp;gt;&amp;lt;I&amp;gt;label&amp;lt;/I&amp;gt; SYSTEM &amp;lt;I&amp;gt;len&amp;lt;/I&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate &amp;lt;I&amp;gt;len&amp;lt;/I&amp;gt; storage locations in 16-bit [[System RAM]], assigning the address to &amp;lt;I&amp;gt;label&amp;lt;/I&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 16-bit memory from $2F0 - $35F.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;/CENTER&amp;gt;&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;br /&amp;gt;&amp;lt;br /&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;br /&amp;gt;&amp;lt;br /&amp;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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;See source code below for calling convention.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&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;&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;= Examples =&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;= Examples =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mr z</name></author>	</entry>

	<entry>
		<id>http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=2968&amp;oldid=prev</id>
		<title>Mr z at 04:41, 7 September 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=2968&amp;oldid=prev"/>
				<updated>2008-09-07T04:41:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&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 style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 04:41, 7 September 2008&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-l4&quot; &gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&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;&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;CENTER&amp;gt;&amp;lt;TABLE BORDER&amp;gt;&amp;lt;TR&amp;gt;&amp;lt;TH&amp;gt;Macro&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;Action performed&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;Notes&amp;lt;/TH&amp;gt;&amp;lt;/TR&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;CENTER&amp;gt;&amp;lt;TABLE BORDER&amp;gt;&amp;lt;TR&amp;gt;&amp;lt;TH&amp;gt;Macro&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;Action performed&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;Notes&amp;lt;/TH&amp;gt;&amp;lt;/TR&amp;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;&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;SCRATCH&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate storage in 8-bit [[Scratchpad RAM]]&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 8-bit memory from $102 - $1EF.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;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;&amp;lt;TR&amp;gt;&amp;lt;TD&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;lt;I&amp;gt;label&amp;lt;/I&lt;/ins&gt;&amp;gt; SCRATCH &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;I&amp;gt;len&amp;lt;/I&amp;gt;&lt;/ins&gt;&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;I&amp;gt;len&amp;lt;/I&amp;gt; &lt;/ins&gt;storage &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;locations &lt;/ins&gt;in 8-bit [[Scratchpad RAM]]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, assigning the address to &amp;lt;I&amp;gt;label&amp;lt;/I&amp;gt;&lt;/ins&gt;&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 8-bit memory from $102 - $1EF.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;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;&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;SYSTEM&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate storage in 16-bit [[System RAM]]&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 16-bit memory from $2F0 - $35F.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;/CENTER&amp;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;&amp;lt;TR&amp;gt;&amp;lt;TD&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;lt;I&amp;gt;label&amp;lt;/I&lt;/ins&gt;&amp;gt; SYSTEM &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;I&amp;gt;len&amp;lt;/I&amp;gt;&lt;/ins&gt;&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;I&amp;gt;len&amp;lt;/I&amp;gt; &lt;/ins&gt;storage &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;locations &lt;/ins&gt;in 16-bit [[System RAM]]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, assigning the address to &amp;lt;I&amp;gt;label&amp;lt;/I&amp;gt;&lt;/ins&gt;&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 16-bit memory from $2F0 - $35F.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;/CENTER&amp;gt;&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;br /&amp;gt;&amp;lt;br /&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;br /&amp;gt;&amp;lt;br /&amp;gt;&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;See source code below for calling convention.&amp;lt;br /&amp;gt;&amp;lt;br /&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;See source code below for calling convention.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mr z</name></author>	</entry>

	<entry>
		<id>http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=2967&amp;oldid=prev</id>
		<title>Mr z at 04:08, 7 September 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=2967&amp;oldid=prev"/>
				<updated>2008-09-07T04:08:22Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&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 style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 04:08, 7 September 2008&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-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&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;= Functions Provided =&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;= Functions Provided =&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;&amp;lt;CENTER&amp;gt;&amp;lt;TABLE BORDER&amp;gt;&amp;lt;TR&amp;gt;&amp;lt;TH&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Entry point&lt;/del&gt;&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Function provided&lt;/del&gt;&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;Notes&amp;lt;/TH&amp;gt;&amp;lt;/TR&amp;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;&amp;lt;CENTER&amp;gt;&amp;lt;TABLE BORDER&amp;gt;&amp;lt;TR&amp;gt;&amp;lt;TH&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Macro&lt;/ins&gt;&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Action performed&lt;/ins&gt;&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;Notes&amp;lt;/TH&amp;gt;&amp;lt;/TR&amp;gt;&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;TR&amp;gt;&amp;lt;TD&amp;gt;SCRATCH&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate storage in 8-bit [[Scratchpad RAM]]&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 8-bit memory from $102 - $1EF.&amp;lt;/TD&amp;gt;&amp;lt;/TR&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;TR&amp;gt;&amp;lt;TD&amp;gt;SCRATCH&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate storage in 8-bit [[Scratchpad RAM]]&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 8-bit memory from $102 - $1EF.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&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;TR&amp;gt;&amp;lt;TD&amp;gt;SYSTEM&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate storage in 16-bit [[System RAM]]&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 16-bit memory from $2F0 - $35F.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;/CENTER&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;TR&amp;gt;&amp;lt;TD&amp;gt;SYSTEM&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate storage in 16-bit [[System RAM]]&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 16-bit memory from $2F0 - $35F.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;/CENTER&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mr z</name></author>	</entry>

	<entry>
		<id>http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=2966&amp;oldid=prev</id>
		<title>Mr z: /* Notes */</title>
		<link rel="alternate" type="text/html" href="http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=2966&amp;oldid=prev"/>
				<updated>2008-09-07T04:07:27Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Notes&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&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 style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 04:07, 7 September 2008&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-l17&quot; &gt;Line 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&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;These routines expect to have sole authority over how the 8-bit [[Scratchpad RAM]] and 16-bit [[System RAM]] are allocated.&amp;#160; They are not compatible with programs that use the [[Executive ROM|EXEC]], as the EXEC reserves some of these locations to itself.&amp;#160; The SCRATCH macro does not disturb the interrupt service vector at $100 - $101.&amp;lt;br /&amp;gt;&amp;lt;br /&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;These routines expect to have sole authority over how the 8-bit [[Scratchpad RAM]] and 16-bit [[System RAM]] are allocated.&amp;#160; They are not compatible with programs that use the [[Executive ROM|EXEC]], as the EXEC reserves some of these locations to itself.&amp;#160; The SCRATCH macro does not disturb the interrupt service vector at $100 - $101.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&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;When using this scheme, you should use the SYSTEM macro to declare a stack, and set the [[CP-1610#Registers|stack pointer (R6)]] to point to this stack early in your initialization.&amp;#160; For instance:&amp;lt;br /&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br /&amp;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;When using this scheme, you should use the SYSTEM macro to declare a stack, and set the [[CP-1610#Registers|stack pointer (R6)]] to point to this stack early in your initialization.&amp;#160; For instance:&amp;lt;br /&amp;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;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&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 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;STACK&amp;#160;  SYSTEM&amp;#160; 32&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ; Reserve 32 words of stack space&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;STACK&amp;#160;  SYSTEM&amp;#160; 32&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ; Reserve 32 words of stack space&lt;/div&gt;&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-l24&quot; &gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&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 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;Note that you will lose the previous contents of your stack when you do this, which is why it should be one of the first things you do in your initialization.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;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;Note that you will &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;effectively &lt;/ins&gt;lose the previous contents of your stack when you do this, which is why it should be one of the first things you do in your initialization.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&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;&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;To get an idea of how much Scratchpad RAM and System RAM your program uses, look for the symbols &amp;quot;.SCRMEM&amp;quot; and &amp;quot;.SYSMEM&amp;quot; in the assembler listing file or symbol dump file.&amp;#160; .SCRMEM indicates the first free location of Scratchpad RAM, and .SYSMEM indicates the first free location of System RAM.&amp;#160; The macros allocate from the bottom of memory toward the top.&amp;#160; Therefore, $1F0 - .SCRMEM gives the remaining amount of 8-bit Scratchpad RAM, and $360 - .SYSMEM gives the remaining amount of 16-bit System RAM.&amp;lt;br /&amp;gt;&amp;lt;br /&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;To get an idea of how much Scratchpad RAM and System RAM your program uses, look for the symbols &amp;quot;.SCRMEM&amp;quot; and &amp;quot;.SYSMEM&amp;quot; in the assembler listing file or symbol dump file.&amp;#160; .SCRMEM indicates the first free location of Scratchpad RAM, and .SYSMEM indicates the first free location of System RAM.&amp;#160; The macros allocate from the bottom of memory toward the top.&amp;#160; Therefore, $1F0 - .SCRMEM gives the remaining amount of 8-bit Scratchpad RAM, and $360 - .SYSMEM gives the remaining amount of 16-bit System RAM.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mr z</name></author>	</entry>

	<entry>
		<id>http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=2965&amp;oldid=prev</id>
		<title>Mr z at 04:06, 7 September 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.intellivision.us/index.php?title=Dseg.mac&amp;diff=2965&amp;oldid=prev"/>
				<updated>2008-09-07T04:06:45Z</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;[[Category:Programming]] [[Category:Library]]&lt;br /&gt;
&lt;br /&gt;
= Functions Provided =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CENTER&amp;gt;&amp;lt;TABLE BORDER&amp;gt;&amp;lt;TR&amp;gt;&amp;lt;TH&amp;gt;Entry point&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;Function provided&amp;lt;/TH&amp;gt;&amp;lt;TH&amp;gt;Notes&amp;lt;/TH&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;SCRATCH&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate storage in 8-bit [[Scratchpad RAM]]&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 8-bit memory from $102 - $1EF.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&amp;lt;TD&amp;gt;SYSTEM&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocate storage in 16-bit [[System RAM]]&amp;lt;/TD&amp;gt;&amp;lt;TD&amp;gt;Allocated range will be in 16-bit memory from $2F0 - $35F.&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;/CENTER&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
See source code below for calling convention.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
(todo... please contribute!)&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
These routines expect to have sole authority over how the 8-bit [[Scratchpad RAM]] and 16-bit [[System RAM]] are allocated.  They are not compatible with programs that use the [[Executive ROM|EXEC]], as the EXEC reserves some of these locations to itself.  The SCRATCH macro does not disturb the interrupt service vector at $100 - $101.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When using this scheme, you should use the SYSTEM macro to declare a stack, and set the [[CP-1610#Registers|stack pointer (R6)]] to point to this stack early in your initialization.  For instance:&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
STACK   SYSTEM  32          ; Reserve 32 words of stack space&lt;br /&gt;
        MVII    #STACK, R6  ; Initialize stack pointer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you will lose the previous contents of your stack when you do this, which is why it should be one of the first things you do in your initialization.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get an idea of how much Scratchpad RAM and System RAM your program uses, look for the symbols &amp;quot;.SCRMEM&amp;quot; and &amp;quot;.SYSMEM&amp;quot; in the assembler listing file or symbol dump file.  .SCRMEM indicates the first free location of Scratchpad RAM, and .SYSMEM indicates the first free location of System RAM.  The macros allocate from the bottom of memory toward the top.  Therefore, $1F0 - .SCRMEM gives the remaining amount of 8-bit Scratchpad RAM, and $360 - .SYSMEM gives the remaining amount of 16-bit System RAM.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source Code =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;* ======================================================================== *;&lt;br /&gt;
;*  These routines are placed into the public domain by their author.  All  *;&lt;br /&gt;
;*  copyright rights are hereby relinquished on the routines and data in    *;&lt;br /&gt;
;*  this file.  -- Joseph Zbiciak, 2008                                     *;&lt;br /&gt;
;* ======================================================================== *;&lt;br /&gt;
            IF (DEFINED _DSEG_MAC) == 0&lt;br /&gt;
_DSEG_MAC   EQU     1&lt;br /&gt;
&lt;br /&gt;
;; ======================================================================== ;;&lt;br /&gt;
;;  SCRATCH   Declare a variable in 8-bit (scratch) memory                  ;;&lt;br /&gt;
;;  SYSTEM    Declare a variable in 16-bit (system) memory                  ;;&lt;br /&gt;
;;                                                                          ;;&lt;br /&gt;
;;  These macros provide a convenient method for declaring variables in the ;;&lt;br /&gt;
;;  Intellivision's internal memory.  Rather than rely on EQUs and one's    ;;&lt;br /&gt;
;;  own memory, you can use these macros to declare your variables in RAM.  ;;&lt;br /&gt;
;;                                                                          ;;&lt;br /&gt;
;;  Both work identically, with the only difference being which pool of     ;;&lt;br /&gt;
;;  memory the variable gets allocated in.  SCRATCH allocates storage in    ;;&lt;br /&gt;
;;  8-bit memory at $102 through $1EF.  SYSTEM allocates storage in 16-bit  ;;&lt;br /&gt;
;;  memory at $2F0 through $35F.                                            ;;&lt;br /&gt;
;;                                                                          ;;&lt;br /&gt;
;;  Both macros expect to own the entire pool.  If you manually allocate    ;;&lt;br /&gt;
;;  some addresses in either range and use these macros, the two may clash. ;;&lt;br /&gt;
;;  You will need to adapt these to skip those addresses, or change the     ;;&lt;br /&gt;
;;  manual allocations to use these macros.                                 ;;&lt;br /&gt;
;;                                                                          ;;&lt;br /&gt;
;;  USAGE                                                                   ;;&lt;br /&gt;
;;                                                                          ;;&lt;br /&gt;
;;      label SCRATCH len                                                   ;;&lt;br /&gt;
;;      label SYSTEM  len                                                   ;;&lt;br /&gt;
;;                                                                          ;;&lt;br /&gt;
;;  where 'label' is the name of the label to associate with the memory     ;;&lt;br /&gt;
;;  range, and 'len' is how many locations to set aside (typically 1).      ;;&lt;br /&gt;
;;                                                                          ;;&lt;br /&gt;
;;  EXAMPLES                                                                ;;&lt;br /&gt;
;;                                                                          ;;&lt;br /&gt;
;;      FLAG  SCRATCH 1     ; Allocate 1 8-bit location, named &amp;quot;FLAG&amp;quot;       ;;&lt;br /&gt;
;;      STACK SYSTEM  32    ; Allocate 32 16-bit locations, named &amp;quot;STACK&amp;quot;   ;;&lt;br /&gt;
;;                                                                          ;;&lt;br /&gt;
;;  Note:  For the &amp;quot;STACK&amp;quot; example, this won't place your stack there       ;;&lt;br /&gt;
;;  unless you also do &amp;quot;MVII #STACK, R6&amp;quot; to relocate your stack.            ;;&lt;br /&gt;
;; ======================================================================== ;;&lt;br /&gt;
&lt;br /&gt;
.SCRMEM     SET     $102&lt;br /&gt;
.SYSMEM     SET     $2F0&lt;br /&gt;
&lt;br /&gt;
MACRO       SCRATCH l&lt;br /&gt;
            EQU     .SCRMEM&lt;br /&gt;
            LISTING &amp;quot;off&amp;quot;&lt;br /&gt;
.SCRMEM     SET     .SCRMEM + %l%&lt;br /&gt;
            IF      .SCRMEM &amp;gt; $1F0&lt;br /&gt;
                ERR     &amp;quot;Scratch Memory Overflow&amp;quot;&lt;br /&gt;
            ENDI&lt;br /&gt;
            LISTING &amp;quot;prev&amp;quot;&lt;br /&gt;
ENDM&lt;br /&gt;
&lt;br /&gt;
MACRO       SYSTEM  l&lt;br /&gt;
            EQU     .SYSMEM&lt;br /&gt;
            LISTING &amp;quot;off&amp;quot;&lt;br /&gt;
.SYSMEM     SET     .SYSMEM + %l%&lt;br /&gt;
            IF      .SYSMEM &amp;gt; $360&lt;br /&gt;
                ERR     &amp;quot;System Memory Overflow&amp;quot;&lt;br /&gt;
            ENDI&lt;br /&gt;
            LISTING &amp;quot;prev&amp;quot;&lt;br /&gt;
ENDM&lt;br /&gt;
&lt;br /&gt;
            ENDI&lt;br /&gt;
&lt;br /&gt;
;; ======================================================================== ;;&lt;br /&gt;
;;  End of File:  dseg.mac                                                  ;;&lt;br /&gt;
;; ======================================================================== ;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mr z</name></author>	</entry>

	</feed>