<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3AAnswers_5</id>
	<title>Z80:Answers 5 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3AAnswers_5"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Answers_5&amp;action=history"/>
	<updated>2026-04-29T06:47:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=Z80:Answers_5&amp;diff=142&amp;oldid=prev</id>
		<title>KermMartian: Created page with &quot;= Topic questions = 1. ASCII is the American Standard Code for Information Interchange. Though TI uses a different standard than the currently accepted computer standard, it f...&quot;</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Answers_5&amp;diff=142&amp;oldid=prev"/>
		<updated>2016-02-05T07:36:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Topic questions = 1. ASCII is the American Standard Code for Information Interchange. Though TI uses a different standard than the currently accepted computer standard, it f...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Topic questions =&lt;br /&gt;
1. ASCII is the American Standard Code for Information Interchange. Though TI uses a different standard than the currently accepted computer standard, it functions in a similar function: data represented by numbers point to an offset that holds a representation of the character.&lt;br /&gt;
&lt;br /&gt;
2. GetKey will wait for a key to be pressed to return a value, and GetCSC will check to see if a key has been pressed, and if so, return that value. Also, GetKey utilizes the shift operators ([2nd] and [Alpha]) while getCSC returns a scan code for those two keys.&lt;br /&gt;
&lt;br /&gt;
= Code Fragments =&lt;br /&gt;
3. Write a short program to display &amp;quot;HELLO WORLD&amp;quot; diagonally&lt;br /&gt;
&lt;br /&gt;
    ;here&amp;#039;s one that looks decent&lt;br /&gt;
     ld hl,0&lt;br /&gt;
     ld (pencol),hl&lt;br /&gt;
     ld hl,txt&lt;br /&gt;
    loop:&lt;br /&gt;
     ld a,(hl)&lt;br /&gt;
     or a&lt;br /&gt;
     jr z,stop&lt;br /&gt;
     bcall(_vPutmap)&lt;br /&gt;
     inc hl&lt;br /&gt;
     push hl&lt;br /&gt;
     ld hl,(pencol)&lt;br /&gt;
     inc h&lt;br /&gt;
     inc h&lt;br /&gt;
     inc h&lt;br /&gt;
     ld (pencol),hl&lt;br /&gt;
     pop hl&lt;br /&gt;
     jr loop&lt;br /&gt;
    stop:&lt;br /&gt;
     bcall(_GetKey)&lt;br /&gt;
     ret&lt;br /&gt;
    txt:&lt;br /&gt;
     .db &amp;quot;HELLO WORLD&amp;quot;,0&lt;br /&gt;
&lt;br /&gt;
4. Write a program that moves a dot around the screen when the user presses an arrow key. (hint: Use the _IPoint, or see sprites for a better method)&lt;br /&gt;
&lt;br /&gt;
    ;sorry, no comments&lt;br /&gt;
     bcall(_ClrLCDFull)&lt;br /&gt;
     set fullScrnDraw, (IY + apiFlg4)&lt;br /&gt;
     bcall(_runindicoff)&lt;br /&gt;
     ld bc,$3232&lt;br /&gt;
     ld d,1&lt;br /&gt;
     push bc&lt;br /&gt;
     bcall(_IPoint)&lt;br /&gt;
    keyloop:&lt;br /&gt;
     bcall(_GetCSC)&lt;br /&gt;
     cp skup&lt;br /&gt;
     jr z,moveUp&lt;br /&gt;
     cp skdown&lt;br /&gt;
     jr z,movedown&lt;br /&gt;
     cp skleft&lt;br /&gt;
     jr z,moveleft&lt;br /&gt;
     cp skright&lt;br /&gt;
     jr z,moveright&lt;br /&gt;
     cp skclear&lt;br /&gt;
     jr z,quit&lt;br /&gt;
     jr keyloop&lt;br /&gt;
     &lt;br /&gt;
    quit:&lt;br /&gt;
     pop bc&lt;br /&gt;
     bcall(_ClrLCDFull)&lt;br /&gt;
     ret&lt;br /&gt;
     &lt;br /&gt;
    movedown:&lt;br /&gt;
     ld d,0&lt;br /&gt;
     pop bc&lt;br /&gt;
     push bc&lt;br /&gt;
     bcall(_IPoint)&lt;br /&gt;
     pop bc&lt;br /&gt;
     ld a,c&lt;br /&gt;
     or a&lt;br /&gt;
     jr z,$+3&lt;br /&gt;
     dec a&lt;br /&gt;
     ld c,a&lt;br /&gt;
     push bc&lt;br /&gt;
     ld d,1&lt;br /&gt;
     bcall(_IPoint)&lt;br /&gt;
     jr keyloop&lt;br /&gt;
    &lt;br /&gt;
    moveup:&lt;br /&gt;
     ld d,0&lt;br /&gt;
     pop bc&lt;br /&gt;
     push bc&lt;br /&gt;
     bcall(_IPoint)&lt;br /&gt;
     pop bc&lt;br /&gt;
     ld a,c&lt;br /&gt;
     cp 63&lt;br /&gt;
     jr z,$+3&lt;br /&gt;
     inc a&lt;br /&gt;
     ld c,a&lt;br /&gt;
     push bc&lt;br /&gt;
     ld d,1&lt;br /&gt;
     bcall(_IPoint)&lt;br /&gt;
     jr keyloop&lt;br /&gt;
    &lt;br /&gt;
    moveleft:&lt;br /&gt;
     ld d,0&lt;br /&gt;
     pop bc&lt;br /&gt;
     push bc&lt;br /&gt;
     bcall(_IPoint)&lt;br /&gt;
     pop bc&lt;br /&gt;
     ld a,b&lt;br /&gt;
     or a&lt;br /&gt;
     jr z,$+3&lt;br /&gt;
     dec a&lt;br /&gt;
     ld b,a&lt;br /&gt;
     push bc&lt;br /&gt;
     ld d,1&lt;br /&gt;
     bcall(_IPoint)&lt;br /&gt;
     jr keyloop&lt;br /&gt;
    &lt;br /&gt;
    moveright:&lt;br /&gt;
     ld d,0&lt;br /&gt;
     pop bc&lt;br /&gt;
     push bc&lt;br /&gt;
     bcall(_IPoint)&lt;br /&gt;
     pop bc&lt;br /&gt;
     ld a,b&lt;br /&gt;
     cp 95&lt;br /&gt;
     jr z,$+3&lt;br /&gt;
     inc a&lt;br /&gt;
     ld b,a&lt;br /&gt;
     push bc&lt;br /&gt;
     ld d,1&lt;br /&gt;
     bcall(_IPoint)&lt;br /&gt;
     jr keyloop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Programming Errors =&lt;br /&gt;
5. Completely correct&lt;br /&gt;
&lt;br /&gt;
6. Two errors: First of all, ionfastcopy uses plotsscreen instead of appbackupscreen, and the way it defines the buffer is running through the rows, as opposed to the columns. Even if plotsscreen was used, you would have an interesting line pattern drawn instead of an 8*8 box (feel free to try it).&lt;br /&gt;
&lt;br /&gt;
{{lowercase}}&lt;br /&gt;
[[Category:Z80 Assembly]]&lt;br /&gt;
[[Category:Z80 Heaven]]&lt;/div&gt;</summary>
		<author><name>KermMartian</name></author>
	</entry>
</feed>