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

Function das

source/emulation/cpu/normal/instructions.cpp:355–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355void das(CPU* cpu) {
356 cpu->lazyFlagType=FLAGS_NONE;
357 U8 osigned=AL & 0x80;
358 if (((AL & 0x0f) > 9) || cpu->getAF()) {
359 if ((AL>0x99) || cpu->getCF()) {
360 AL-=0x60;
361 cpu->addCF();
362 } else {
363 cpu->setCF(AL<=0x05);
364 }
365 AL-=6;
366 cpu->addAF();
367 } else {
368 if ((AL>0x99) || cpu->getCF()) {
369 AL-=0x60;
370 cpu->addCF();
371 } else {
372 cpu->removeCF();
373 }
374 cpu->removeAF();
375 }
376 cpu->setOF(osigned && ((AL & 0x80)==0));
377 cpu->setSF(AL & 0x80);
378 cpu->setZF(AL==0);
379 cpu->setPFonValue(AL);
380}
381
382void aaa(CPU* cpu) {
383 cpu->lazyFlagType=FLAGS_NONE;

Callers 1

normal_dasFunction · 0.70

Calls 11

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

Tested by

no test coverage detected