Konference: SAPI-1 a československé mikropočítače

Od: Jiri Biba
Datum: 30.8.2012 04:12
Předmět: Podivna instrukce


Ahoj!

Resim tu nejaky nasobeni a deleni na Z80. Nekde jsem vyhrabal algoritmy ale narazil jsem na zahadu. Pouzivaji nedokumentovany instrukce SLIA.

Some routines use "undocumented" instruction SLIA (Shift Left Inverted Arithmetic), sometimes also denoted as SLL (Shift Left Logical). SLIA shifts register left and sets the least significant bit to 1 (operation code is CBh 30h..37h). It is used in routines which subtract 16-bit divisor from the 16-bit remainder. As there is no simple way to test whether such subtraction will be successful without actually performing it, it's better to assume it will be successful (hence 1 in the LSB) and possibly make a correction to 0. Doing it the opposite way introduces the overhead of Carry complement (see bellow).

Netusite prosim nekdo, ktery procesory (vyrobci) tohle podporuji?

Diky

Jirka


Ostatní příspěvky vlákna:

 
[2012/1 (114)] [2012/2 (102)] [2012/3 (30)] [2012/4 (9)] [2012/5 (18)] [2012/6 (32)] [2012/7 (143)] [2012/8 (197)] [2012/9 (161)] [2012/10 (43)] [2012/11 (90)] [2012/12 (37)]


[2010 (676)] [2011 (586)] [2012 (976)] [2013 (538)]