RE: A85: Most unused opcode


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

RE: A85: Most unused opcode




I don't know about you, but I use the RST commands quite a bit for variable 
manipulation.  RST 10h & 20h are used heavily for accessing variables, at 
least in my code...

Thanks for the help.  I hadn't thought of ld A,A.

----------
From: 	Mike Bandsmer[SMTP:mbandsme@UVic.CA]
Sent: 	Thursday, November 12, 1998 4:15 AM
To: 	'assembly-85@lists.ticalc.org'
Subject: 	Re: A85: Most unused opcode



I don't think a single marker byte is feasible (a jr instruction can have
any byte after it).  However, a multi-byte marker may be feasible.  At the
end of this email are some opcodes that are rarely, if ever, used,
especially two or three times in a row.  (The ones I chose aren't likely
to appear in ASCII strings either.)  However, note that even an
instruction like ld hl,XXXX or call XXXX may introduce two arbitrary bytes
into your code.  Worse, a .db or .dw can introduce any sequence of
arbitrary bytes into your code.

I think a better solution than storing a marker byte is this: simply store
the OFFSET into your code where the "mark" is.  This offset could be
stored either in a fixed location, or within the program itself (e.g. at
the beginning or end).  This would eliminate the need for the search.

But in case you can't for some reason just store the offset of the mark,
here are some uncommon opcodes anyway:

instruction  ; opcode
LD A,A   ; 7F
RST 8H                  ; CF
RST 10H                 ; D7
RST 18H   ; DF
RST 20H                 ; E7
RST 28H   ; EF
RST 30H   ; F7
RST 38H   ; FF

Mike

On Thu, 12 Nov 1998, Richard Owen Lewis wrote:
>
> This is a survey kind of thing.  I need to know what you guys think the
> most unused Z80 opcode is on the 85.
>
> Yes, there is a purpose to this.  I need to have some kind of marker 
byte,
> inside my code, so at runtime, I can have a program search through the
> code,  pick out my marker, patch in some code that needs to be there, and 
> then when its done, put it back the way it was.
>
> If this proves to be completely unfeasable, I'll just have to work on a 
new
> relocation routine (my old one is buggy, and I don't remember how it 
works
> anyway =)
>
> Yes, this is for Summit, in case somebody is wondering.
>
>
>





begin 600 WINMAIL.DAT
M>)\^(C85`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($UO<W0@
M=6YU<V5D(&]P8V]D90#J" $%@ ,`#@```,X'"P`,``X`"@`;``0`(P$!(( #
M``X```#.!PL`# `.``@`'@`$`"0!`0F `0`A````,C@U0D0W1C,S.#=!1#(Q
M,4%%,C8T-#0U-3,U-# P,# `X 8!`Y &`&0(```2````"P`C```````#`"8`
M``````L`*0```````P`V``````! `#D``!M(WX .O@$>`' ``0```!P```!2
M13H@03@U.B!-;W-T('5N=7-E9"!O<&-O9&4``@%Q``$````6`````;X.@-](
M\]=;*7HX$=*N)D1%4U0`````'@`># $````%````4TU44 `````>`!\,`0``
M`!L```!R:6-H87)D;&5W:7- 8V5D87)C:71Y+FYE= ```P`&$'4K?B,#``<0
M9@8``!X`"! !````90```$E$3TY42TY/5T%"3U5464]5+$)55$E54T542$52
M4U1#3TU-04Y$4U%5251%04))5$9/4E9!4DE!0DQ%34%.25!53$%424].4E-4
M,3!()C(P2$%21553141(14%624Q91D]204,``````@$)$ $```#=!@``V08`
M`&0,``!,6D9UNQ\E'?\`"@$/`A4"J 7K`H,`4 +R"0(`8V@*P'-E=#(W!@`&
MPP*#,@/%`@!P<D)Q$>)S=&5M`H,S-P+D!Q,"@S0$1A,S,2!W"%4'L@* ?0J 
M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