http://wiki.intellivision.us/index.php?title=Hex16.asm&feed=atom&action=history
Hex16.asm - Revision history
2024-03-28T16:54:25Z
Revision history for this page on the wiki
MediaWiki 1.30.0
http://wiki.intellivision.us/index.php?title=Hex16.asm&diff=14809&oldid=prev
Mr z: Protected "Hex16.asm" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))
2010-12-04T08:34:53Z
<p>Protected "<a href="/index.php/Hex16.asm" title="Hex16.asm">Hex16.asm</a>" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr style="vertical-align: top;" lang="en">
<td colspan="1" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: white; color:black; text-align: center;">Revision as of 08:34, 4 December 2010</td>
</tr><tr><td colspan="2" style="text-align: center;" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Mr z
http://wiki.intellivision.us/index.php?title=Hex16.asm&diff=2997&oldid=prev
Mr z: /* Notes */
2008-09-08T06:41:50Z
<p><span dir="auto"><span class="autocomment">Notes</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 06:41, 8 September 2008</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l14" >Line 14:</td>
<td colspan="2" class="diff-lineno">Line 14:</td></tr>
<tr><td class='diff-marker'> </td><td style="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;"><div>= Notes =</div></td><td class='diff-marker'> </td><td style="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;"><div>= Notes =</div></td></tr>
<tr><td class='diff-marker'> </td><td style="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;"></td><td class='diff-marker'> </td><td style="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;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="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;"><div>This <del class="diffchange diffchange-inline">function is used by </del>[[<del class="diffchange diffchange-inline">prnum32</del>.asm]].  <del class="diffchange diffchange-inline">Therefore, </del>you <del class="diffchange diffchange-inline">will </del>need <del class="diffchange diffchange-inline">to include both in your application if you're using [[prnum32.asm]] to print 32-bit numbers</del>.</div></td><td class='diff-marker'>+</td><td style="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;"><div>This <ins class="diffchange diffchange-inline">file does not coexist with </ins>[[<ins class="diffchange diffchange-inline">hexdisp</ins>.asm]].  <ins class="diffchange diffchange-inline">If </ins>you need <ins class="diffchange diffchange-inline">more general hexadecimal number display routines, use that file, not this one</ins>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="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;"></td><td class='diff-marker'> </td><td style="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;"></td></tr>
<tr><td class='diff-marker'> </td><td style="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;"><div>= Source Code =</div></td><td class='diff-marker'> </td><td style="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;"><div>= Source Code =</div></td></tr>
</table>
Mr z
http://wiki.intellivision.us/index.php?title=Hex16.asm&diff=2996&oldid=prev
Mr z at 06:41, 8 September 2008
2008-09-08T06:41:08Z
<p></p>
<p><b>New page</b></p><div>[[Category:Programming]] [[Category:Library]]<br />
<br />
= Functions Provided =<br />
<br />
<CENTER><TABLE BORDER><TR><TH>Entry point</TH><TH>Function provided</TH><TH>Notes</TH></TR><br />
<TR><TD>HEX16</TD><TD>Print a 16-bit hexadecimal number</TD><TD>This file does not coexist with [[hexdisp.asm]].</TD></TR></TABLE></CENTER><br />
<br /><br /><br />
See source code below for calling convention.<br /><br /><br />
<br />
= Examples =<br />
<br />
(todo... please contribute!)<br />
<br />
= Notes =<br />
<br />
This function is used by [[prnum32.asm]]. Therefore, you will need to include both in your application if you're using [[prnum32.asm]] to print 32-bit numbers.<br />
<br />
= Source Code =<br />
<br />
<pre><br />
;* ======================================================================== *;<br />
;* These routines are placed into the public domain by their author. All *;<br />
;* copyright rights are hereby relinquished on the routines and data in *;<br />
;* this file. -- Joseph Zbiciak, 2008 *;<br />
;* ======================================================================== *;<br />
<br />
;;==========================================================================;;<br />
;; NOTE: IF YOU NEED ANY OF HEX4, HEX8, HEX12, HEX4M, HEX8M or HEX12M, ;;<br />
;; DO NOT USE THIS FILE. USE "hexdisp.asm" INSTEAD. THIS FILE AND THAT ;;<br />
;; ONE CANNOT BE USED TOGETHER. ;;<br />
;;==========================================================================;;<br />
<br />
;; ======================================================================== ;;<br />
;; HEX16 ;;<br />
;; Display a 4-digit hex number on the screen ;;<br />
;; ;;<br />
;; INPUTS: ;;<br />
;; R0 -- Hex number ;;<br />
;; R1 -- Color mask / screen format word ;;<br />
;; R4 -- Screen offset ;;<br />
;; ;;<br />
;; OUTPUTS: ;;<br />
;; R0 -- rotated left by 3 ;;<br />
;; R1 -- unmodified ;;<br />
;; R2 -- trashed ;;<br />
;; R3 -- zeroed ;;<br />
;; R4 -- points just to right of string ;;<br />
;; ======================================================================== ;;<br />
HEX16 PROC<br />
; Rotate R0 left by 3, so that our digit will be in the correct<br />
; position within the screen format word.<br />
MOVR R0, R3<br />
SLLC R3, 2<br />
RLC R0, 2 ; First, rotate by two bits...<br />
SLLC R3, 1<br />
RLC R0, 1 ; ... and then by one more.<br />
<br />
MVII #4, R3 ; Iterate through four digits.<br />
@@loop:<br />
; Rotate R0 left by 4, so that we can cycle through each digit<br />
; one at a time.<br />
MOVR R0, R2<br />
SLLC R2, 2<br />
RLC R0, 2 ; First, rotate by two bits...<br />
SLLC R2, 2<br />
RLC R0, 2 ; ... and then by two more.<br />
<br />
; Mask out a single hex digit<br />
MOVR R0, R2<br />
ANDI #$78, R2<br />
<br />
; Is it A..F? If so, add an offset so that the correct ASCII<br />
; value is selected. Otherwise do nothing special.<br />
CMPI #$50, R2 ; $50 is $A shifted left by 3.<br />
BLT @@digit<br />
ADDI #$38, R2 ; If the digit >= A, add 7 << 3.<br />
@@digit:<br />
ADDI #$80, R2 ; Generate proper GROM index.<br />
XORR R1, R2 ; Merge in the screen format word<br />
MVO@ R2, R4 ; Display the digit to the screen.<br />
<br />
DECR R3 ; Iterate three more times.<br />
BNE @@loop<br />
<br />
JR R5 ; Done! Return.<br />
ENDP<br />
<br />
;; ======================================================================== ;;<br />
;; End of File: hex16.asm ;;<br />
;; ======================================================================== ;;<br />
</pre></div>
Mr z