MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / aas

Function aas

source/emulation/cpu/normal/instructions.cpp:407–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405}
406
407void aas(CPU* cpu) {
408 cpu->lazyFlagType=FLAGS_NONE;
409 if ((AL & 0x0f)>9) {
410 cpu->setSF(AL>0x85);
411 AX -= 0x106;
412 cpu->removeOF();
413 cpu->addCF();
414 cpu->addAF();
415 } else if (cpu->getAF()) {
416 cpu->setOF((AL>=0x80) && (AL<=0x85));
417 cpu->setSF((AL<0x06) || (AL>0x85));
418 AX -= 0x106;
419 cpu->addCF();
420 cpu->addAF();
421 } else {
422 cpu->setSF(AL>=0x80);
423 cpu->removeOF();
424 cpu->removeCF();
425 cpu->removeAF();
426 }
427 cpu->setZF(AL == 0);
428 cpu->setPFonValue(AL);
429 AL &= 0x0F;
430}
431
432void aad(CPU* cpu, U32 value) {
433 AL = AH * value + AL;

Callers 1

normal_aasFunction · 0.70

Calls 10

setSFMethod · 0.80
removeOFMethod · 0.80
addCFMethod · 0.80
addAFMethod · 0.80
setOFMethod · 0.80
removeCFMethod · 0.80
removeAFMethod · 0.80
setZFMethod · 0.80
setPFonValueMethod · 0.80
getAFMethod · 0.45

Tested by

no test coverage detected