<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>¡Gózatelo! &#187; Programming</title>
	<atom:link href="http://www.gozatelo.com/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gozatelo.com/blog</link>
	<description>Today is a new day, embrace it!</description>
	<lastBuildDate>Tue, 27 Jul 2010 01:05:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Norton Utilities For The Atari 8-bit</title>
		<link>http://www.gozatelo.com/blog/2005/12/07/nu-atari-8-bit/</link>
		<comments>http://www.gozatelo.com/blog/2005/12/07/nu-atari-8-bit/#comments</comments>
		<pubDate>Wed, 07 Dec 2005 18:40:33 +0000</pubDate>
		<dc:creator>Nelson</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.gozatelo.com/blog/?p=39</guid>
		<description><![CDATA[Continuing with the theme of my last post, I will now give my account of my adventures with my Atari 130XE 8-bit computer. The Atari 8-bit was the first computer I owned. My mother bought it for me in 1984. This computer came equipped with 128-Kbytes of memory (which was 64-Kbytes more than the norm [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing with the theme of my last post, I will now give my account of my adventures with my Atari 130XE 8-bit computer.</p>
<p>The <a href="http://en.wikipedia.org/wiki/Atari_8-bit">Atari 8-bit</a> was the first computer I owned. My mother bought it for me in 1984. This computer came equipped with 128-Kbytes of memory (which was 64-Kbytes more than the norm at the time), built-in Atari BASIC, a cartridge slot, and an expansion slot.</p>
<p>By the time Norton Utilities 7 came out for the IBM PC I already owned several, and SpartaDOS 3.2d (a command-line DOS) was already a hit with the Atari 8-bits. This was a great OS that allowed me to easily code command-line programs I was already coding on the IBM PC for the Atari 8-bit .</p>
<p>At that time I was working with huge .arc files (.arc is the extension of the archival shrinking program used before .zip came along) and when I needed to unerase some of these out of necessity I always ended-up damning the unerase command of SpartaDOS because it was so buggy. So I devised a plan to write my own. This idea later merged into a goal to convert many of the Norton Utilities command-line programs to the Atari 8-bit.</p>
<p>My language of choice on the Atari 8-bit was Action! by OSS, Inc. <a href="#footnote-1-39" id="footnote-link-1-39" title="See the footnote."><sup>1</sup></a> Action! was  easy to program in and generated some of the fastest and most compact code I have seen on the Atari 8-bits.</p>
<p>Here are a few lines of code of UnDel (my unerase version) written in Action! <a href="#footnote-2-39" id="footnote-link-2-39" title="See the footnote."><sup>2</sup></a></p>
<p><font size="1">SET $E&nbsp;&nbsp; = $2200<br />
SET $491 = $2200</p>
<p>;SET $E&nbsp;&nbsp; = $2100<br />
;SET $491 = $2100</p>
<p>;SET $495 = $A ; increase variable table</p>
<p>BYTE RTS = [$60]</p>
<p>; primitive system library routines<br />
INCLUDE "D2:>SYS>SYSLIB.ACT"</p>
<p>; IO routines<br />
INCLUDE "D2:>SYS>SYSIO.ACT"</p>
<p>; misc. routines<br />
INCLUDE "D2:>UNERASE>SYSMISC.ACT"</p>
<p>; string routines<br />
INCLUDE "D2:>UNERASE>SYSSTR.ACT"</p>
<p>; Modified SECTIO.ACT<br />
INCLUDE "D2:>RTNS>MSectIO.Act"</p>
<p>; Modified BLKIO.ACT<br />
INCLUDE "D2:>RTNS>MBlkIO.ACT"</p>
<p>; Modified REAL library<br />
INCLUDE "D2:>UNERASE>MREAL.ACT"</p>
<p>; UnErase Code:</p>
<p>byte Version = $701, ; SpartaDOS Version<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; prompt = [0], ; prompt user before unerasing file<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; integrity, ; integrity flag<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drive = [0], ; drive to read sectors from<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UD_flag = [0], ; unerase dirs also<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DO_flag = [28], ; dir open flag (update or read[list deleted])<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dir_flag = [0], ; unerase as dir(1) or file(0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A_flag = [0], ; attribute scan flag<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a_bit, ; archive attribute scan (Set or Cleared)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ss, ; density of sectors (128 or 256)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sd, ; density of sectors for SectIO routines in MSectIO<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wr, ; MSectIO write command &#8212; write or write with verify<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n_a, ; three byte note (xio 38)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n_b,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n_c,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lsb, ; 24 bit numbers in lsb, nsb and msb format<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nsb,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msb,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bit, ; bit to read or modify<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; byyte, ; byte who's bit will be read or modified<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Key, ; used by the the GetKey function<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CWD_flag = [0],<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; l</p>
<p>byte array arg1(30), ; comm-line argument<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; path(30),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bin(8), ; bin data from ml routine decbin<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str_real(20), ; hold a string real-number<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hold(128), ; do a cwd back to the user's cwd dir<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boot(128), ; boot sector<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BMaps(256), ; store bitmaps<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SMaps(256), ; store sectormaps<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fcomp(13), ; file1 for dir entry compare<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmpfile(13), ; file2 for dir entry compare<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subdir(29), ; put the path<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fname(13), ; and the filename<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; raw(24), ; holds raw dir entries<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; atEOL(1) = [$01 $9B], ; Atari EOL</p>
<p>INCLUDE "D2:>RTNS>DecBin.Act"<br />
,<br />
INCLUDE "D2:>RTNS>BinDec.Act"</p>
<p>card p, n, ts, fbm, cBMap = [0], BMap = [0], dosvec = 10,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UC_flag = [0] ; recover dir entry count flag</p>
<p>real rDensity, r256, r65, rnum1, rnum2, realr, ; real result<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rBMap, bits</p>
<p><strong>. . .</strong></p>
<p>Proc Main()</p>
<p>&nbsp; byte num</p>
<p>&nbsp; ;close(1) ; use when compiling in<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;; SpartaDOS 3.2x</p>
<p>&nbsp; device = 0 ; initialize ACTION!'s system device</p>
<p>&nbsp; error = MyError ; now give ACTION! the address of MyError Proc</p>
<p>&nbsp; ZCrName = dosvec + 3 ; ZCRNAME</p>
<p>&nbsp; Path(0) = 0</p>
<p>&nbsp; ValR( "65536&#8243;, r65 )<br />
&nbsp; ValR( "256&#8243;, r256 )<br />
&nbsp; ValR( "8&#8243;, bits )</p>
<p>&nbsp; pute()<br />
&nbsp; printe( "UnErase&nbsp; Version 1.0&nbsp; 1-Jan-1996&#8243; )<br />
&nbsp; printe( " Copr. 1996, Nelson Nieves" )<br />
&nbsp; pute()</p>
<p>&nbsp; ; make sure that we are in SpartaDOS 3.2d or X:</p>
<p>&nbsp; if Version < $32 then<br />
&nbsp;&nbsp;&nbsp; printe ("Not SpartaDOS 3.2d or X!")<br />
&nbsp;&nbsp;&nbsp; if peek($700) <> 'S then ; if in another DOS give the user a chance to<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetKey()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; read the message<br />
&nbsp;&nbsp;&nbsp; fi<br />
&nbsp;&nbsp;&nbsp; Return<br />
&nbsp; fi</p>
<p>&nbsp; ;cmlinput() ; puts command line<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; arguments into lbuf<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; for debugging</p>
<p>&nbsp; num = NumArgs() ; get number of comm-line arguments</p>
<p>&nbsp; if num = 0 or num > 5 then<br />
&nbsp;&nbsp;&nbsp; Usage()<br />
&nbsp;&nbsp;&nbsp; Return<br />
&nbsp; else<br />
&nbsp;&nbsp;&nbsp; for l = 1 to num do<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetArgs(0, arg1)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if Proc_Args(arg1) = 0 then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Usage()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br />
&nbsp;&nbsp;&nbsp; od<br />
&nbsp; fi</p>
<p>&nbsp; if Path(0) = 0 then<br />
&nbsp;&nbsp;&nbsp; printe("Must specify drive or path!")<br />
&nbsp;&nbsp;&nbsp; Return<br />
&nbsp; fi</p>
<p>&nbsp; PathParse( Path, subdir, fname )</p>
<p>&nbsp; if fname(0) = 0 then<br />
&nbsp;&nbsp;&nbsp; scopy(fname, "*.*")<br />
&nbsp; fi</p>
<p>&nbsp; ;setblock( fcomp+1, 12, $20) ; put spaces in fcomp</p>
<p>&nbsp; for l = 0 to 12 do<br />
&nbsp;&nbsp;&nbsp; fcomp(l) = $20<br />
&nbsp; od</p>
<p>&nbsp; fcomp(0) = 8 ; set fcomp string to the length of 8</p>
<p>&nbsp; for l = 1 to fname(0) do<br />
&nbsp;&nbsp;&nbsp; if fname(l) = '. then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scopys( bin, fname, l, l+4)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; makestr(fcomp, bin, 0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit<br />
&nbsp;&nbsp;&nbsp; else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fcomp(l)=fname(l)<br />
&nbsp;&nbsp;&nbsp; fi<br />
&nbsp; od<br />
&nbsp; fcomp(0) = 12 ; just incase<br />
&nbsp; fcomp(9) = '. ; just incase</p>
<p>&nbsp; SetUp()</p>
<p>&nbsp; ChkDisk()</p>
<p>&nbsp; _dir() ; do a dir? and put the result in hold</p>
<p>&nbsp; OpenDir()</p>
<p>&nbsp; if DO_flag = 28 then<br />
&nbsp;&nbsp;&nbsp; if UC_flag = 0 then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pute()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print("No dir entry")<br />
&nbsp;&nbsp;&nbsp; else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pute()<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printc(UC_flag)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(" dir entr")</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if UC_flag < = 1 then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print("y")<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print("ies")<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br />
&nbsp;&nbsp;&nbsp; fi</p>
<p>&nbsp;&nbsp;&nbsp; printe(" recovered.")<br />
&nbsp; else<br />
&nbsp;&nbsp;&nbsp; if UC_flag = 0 then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printe("No deleted dir entries.")<br />
&nbsp;&nbsp;&nbsp; fi<br />
&nbsp; fi</p>
<p>&nbsp; User_cwd()</p>
<p>&nbsp; usr(dosvec, 0) ; exit to dos</p>
<p>Return</font></p>
<p>Many of these program survive today, mostly online in many of the Atari 8-bit archives and in one of my own <a href="http://www.celebritybase.net/atari8/Utilities.shtml">Atari 8-bit websites</a>.</p>
<p>One of the last programs I had started was a defragmentor for the Atari 8-bit. Because of the 128 Kbytes limit of the Atari 8-bit it was to be composed of two command-line programs to accomplish the task. The first program was to be the directory optimizer (this would have removed many of the deleted entries in the directories prior to running the defragmentor—and possibly freeing up sectors.) But by then, it was too late, the Atari 8-bit was already dead and I had no free time to continue investing my time in the project.<br />
</font></p>
<br /><ol class="footnotes"><li id="footnote-1-39">On <a href="http://en.wikipedia.org/wiki/Optimized_Systems_Software">Wikipidea</a> I noticed that the description given to Action! is that of a language similar to BASIC and C, this is wrong in my opinion, Action! has the best of both C and Pascal, not BASIC.  [<a href="#footnote-link-1-39">back</a>]</li><li id="footnote-2-39">This is an older code, where I used a lot of floating point functions (which I later recoded into integer functions [in assembly] for a more compact and faster program). I lost the most recent versions of the codes to many of the programs, although the compiled binary versions of the programs on my website are the most recent versions.  [<a href="#footnote-link-2-39">back</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.gozatelo.com/blog/2005/12/07/nu-atari-8-bit/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
