Re: A85: Question


[Prev][Next][Index][Thread]

Re: A85: Question




Thanks, I pushed HL and popped it before and after GET_KEY in the
extended version of the code that I posted and everything worked.  Once I
get the link routines set up, I will have a beta version available for
download.  I can't really say when that will be though, because I have no
idea myself.

Justin Bosch
justin-b@juno.com

On Fri, 25 Dec 1998 23:12:55 -0700 Richard Owen Lewis
<richardlewis@cedarcity.net> writes:
>
>GET_KEY modifies HL, in case you didn't know.  It sets it to $8000, or 
>
>rather 32768.  That is the problem.  I've run in to that before.  You 
>should read through the inputs and outputs of any routine you use in 
>your 
>code when you have a problem.  It will help you figure stuff like this 
>out 
>on your own better.  You'll save yourself time that way.
>
>----------
>From: 	Justin M Bosch[SMTP:justin-b@juno.com]
>Sent: 	Saturday, December 19, 1998 3:42 AM
>To: 	assembly-85@lists.ticalc.org
>Subject: 	A85: Question
>
>
>Something in the following section of code is corrupting the value of 
>HL.
> When it starts it is a value depending on where the program is in
>memory.  The second time HL is displayed, it is ALWAYS 32,768 (2^15).
>The display and pause routines are only in the code temporarily so 
>that I
>can find whatever bug is causing HL to be messed up.  I cannot figure 
>it
>out and would really like some help.  Also, if anyone could tell me 
>the
>differnece between TR_CHARPUT and TX_CHARPUT I would be grateful.
>
>; B = $CF
>; DE = (x -1, y) for displaying arrow
>
>        ...
>        pop    hl                  ; HL = Game_Speed + 1
>        call   &D_HL       ; Look at current value of HL
>        call   &PAUSE         ; Pause to read it before moving ahead
>
>Menu:
>
>        inc    d                   ; X is now correct value
>        ld     ($800C), de         ; Save coords for displaying left
>arrow
>        ld     a, b                ; Load left arrow character into A
>        call   TX_CHARPUT          ; Display left arrow
>        inc    d                   ; Move over two characters
>        inc    d
>        ld     ($800C), de         ; Save coords for displaying right
>arrow
>        ld     a, c                ; Load right arrow character into A
>        call   TX_CHARPUT          ; Display right arrow
>        dec    d                   ; Restore original coordinates
>
>Menu_Loop:
>
>        call   &D_HL       ; Look at current value of HL
>        ...
>
>D_HL:
>
>        push   de       ; Save coordinates
>        ld     de, $0000      ; Display at (0,0)
>        ld     ($800C), de       ; Save new coordinates
>        call   D_HL_DECI        ;Display HL
>        pop    de          ; Restore HL
>        ret
>
>PAUSE:
>
>        call   GET_KEY
>        or     a
>        jr     z, PAUSE         ; Loop until a key is pressed
>        ret
>
>___________________________________________________________________
>You don't need to buy Internet access to use free Internet e-mail.
>Get completely free e-mail from Juno at 
>http://www.juno.com/getjuno.html
>or call Juno at (800) 654-JUNO [654-5866]
>
>
>
>
>begin 600 WINMAIL.DAT
>M>)\^(@0&`0:0" `$```````!``$``0>0!@`(````Y 0```````#H``$-@ 0`
>M`@````(``@`!!) &`$@!```!````# ````,``# #````"P`/#@`````"`?\/
>M`0```%<`````````@2L?I+ZC$!F=;@#=`0]4`@````!A<W-E;6)L>2TX-4!L
>M:7-T<RYT:6-A;&,N;W)G`%--5% `87-S96UB;'DM.#5 ;&ES=',N=&EC86QC
>M+F]R9P``'@`", $````%````4TU44 `````>``,P`0```!T```!A<W-E;6)L
>M>2TX-4!L:7-T<RYT:6-A;&,N;W)G``````,`%0P!`````P#^#P8````>``$P
>M`0```!\````G87-S96UB;'DM.#5 ;&ES=',N=&EC86QC+F]R9R<```(!"S !
>M````(@```%--5% Z05-314U"3%DM.#5 3$E35%,N5$E#04Q#+D]21P````,`
>M`#D`````"P! .@$````"`?8/`0````0````````#PD$!"( '`!@```!)4$TN
>M36EC<F]S;V9T($UA:6PN3F]T90`Q" $$@ $`$@```%)%.B!!.#4Z(%%U97-T
>M:6]N`%$%`06 `P`.````S@<,`!D`%P`,`#<`!0!9`0$@@ ,`#@```,X'# `9
>M`!<`"0`C``4`0@$!"8 !`"$````T.$$Y-C8X-S1%.4-$,C$Q044R-C0T-#4U
>M,S4T,# P, #>!@$#D 8`- @``!(````+`",```````,`)@``````"P`I````
>M```#`#8``````$ `.0`@E+?&EC"^`1X`< `!````$@```%)%.B!!.#4Z(%%U
>M97-T:6]N`````@%Q``$````6`````;XPEL:OAV:I29Q.$=*N)D1%4U0`````
>M'@`># $````%````4TU44 `````>`!\,`0```!L```!R:6-H87)D;&5W:7- 
>M8V5D87)C:71Y+FYE= ```P`&$$81Q,(#``<0,@8``!X`"! !````90```$=%
>M5$M%64U/1$E&24532$PL24Y#05-%64]51$E$3E1+3D]72513151325143R0X
>M,# P+$]24D%42$52,S(W-CA42$%425-42$504D]"3$5-259%4E5.24Y43U1(
>M051"149/4D4``````@$)$ $```"V!@``L@8``/4-``!,6D9U&D4P%?\`"@$/
>M`A4"J 7K`H,`4 +R"0(`8V@*P'-E=#(W!@`&PP*#,@/%`@!P<D)Q$>)S=&5M
>M`H,S-P+D!Q,"@S0$1A,S,2!W"%4'L@* ?0J ",\)V3OQ& \R-34"@ J!#;$+
>M8.!N9S$P,Q10"PH5804+\F,`0"!'151?\$M%62 $80:0") $(!!(3"P@"X @
>M8V$I$; @>0A@(!V09&X")P5 :VYO=RX@7"!)!4 1L00@:05 =.!O("0X,"#@
>M'B %L1!R871H%K$S,C?T-C@?L501@ 5 ! `@@'4AD" 34&\"8!/@'[(G\G8>
>MH')U`Z >02"1(8"M(G%B#< %L&4?L5D>T21S: A@;&0A4&5AQR80(8 #8'5G
>M:"+#"X"\<'4@,0!P)A (8'0G8_1O9B>A>2%0)_$+@!ZD?G4>D1Y!'L$%P 6@
>M#; @MG<AD"GS(!& (]%A(PJ;!4 #\&P#("&0;' >LUT=L&<(<!Z@$\!U#= @
>M^&QI:QZ@(8 BH2?Q(2!_*?4?D .@)/ "0 20)50GW2RA<RM2*A(1L&PH@"D0
>MPP> ))1W87DN"H4*BPTN,#$@T0(`:2TQ-)XT#? ,T#1S"UDQ-@J@ZP-@$]!C
>M!4 M-I<*AS5+ZPPP-A9&`V$Z-YXV%@R"'"!**: I$070($)O`03P:%M33510
>M.F)J.V,M8D \D!^ +OD%H&U=-S\X309@`C Y?[\ZBP80+> +(#)@'B!$!9!G
>M$^ D\ 7 ,3D>($,`.9(X(< Z-!'@04T]O_DX351O/_\ZBQZ $; &T,!L>2TX
>M-4 N,!/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23H&$X@6P+7!_"X '0*)DL2$3T)WFAEE?_7^!<(</?=]^[W__
>M@0]Y&?\*A;6"LY]YY2F@)N"N<J&?K[&MG]T-L!X@)"#A,)@>Y2)Q*"$`,"F]
>MWZ!_O%M?*3"*LKU/M)RU@E]UD$/_:1![AIB6M^]Z1:%9L#G(+_\8$&HF"H6"
>MH[I/M*L<];@-UP6QDC.X#6JX5'H>((*N_[-2*9 ", ,1*Y N4&,1!"#O$U!H
>M8\LOS#U?UW_8C]F?]]J="H4E@F0"(!]!*3!HD75G\G4HP$D",&_":L%C?T*0
>M!!$@D2FB`U )X-UH9>XM`, #$#*&1]W1/7$+4/\1P"S@*,#>X]_$WM$#<#M!
>M#Q^ MI*D`"@0.B\O=^7CD"X])B]G$< ](Z0`O&UL:C9EDBRAXJ8H(-$!=F V
>M-30M2E5."$\@6^;R-3@V-K\]ID[O3_X<15%M%S$`[$ ```,`$! ``````P`1
>M$ $```! ``<P8'>=3Y8PO@% ``@P8'>=3Y8PO@$>`#T``0````4```!213H@
>&`````*O'
>`
>end
>
>
>

___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]


References: