3
Parzi
4y

Those who know x86 assembly and real mode, what'd I do wrong here?

mov cx,0000
.loop
mov ax,e823
mov bx,1
add cx,1
int 15 ; supposed to be undocumented CMOS raw write on my mobo if bx!=0,ax=e823
test cx,00ff
jne .loop
ret

The JNE doesn't ever trigger, so I end up always returning no matter what cx is. I'm testing if the undocumented writes actually work, and cl is supposed to be 00-FF as it's the address to write bx to in CMOS. I'm running in real mode, if it matters.

Comments
  • 1
    Uh, shouldnt test be a cmp operation instead?
  • 4
    Please, for your sanity, use the standard interrupts. You'll thank me later.
  • 2
    @FrodoSwaggins @Ranchu i'll have to see if that works, thanks. (Seems it's not as different from GBz80ASM as I thought!)
    @PrivateGER what's the fun in that? It's a junker PC i'm not afraid to trash if need be, and it's good ASM practice. Plus, I just like to break shit sometimes. (Also if Compaq didn't want us using it they wouldnt've patented it.)
  • 1
    @Parzi You'll have to start over completely if you ever change motherboards though...
  • 0
    @PrivateGER it supposedly works on all COMPAQ boards after 2011, but y'know, HP. Mine's after that date but actually COMPAQ.
  • 1
    *Standard USE SO comment*
  • 1
    @Gregozor2121 "this is stupid, use this library for C, alsoo this is a duplicate of this unrelated question about the library. Too many false dupe claims? Good, here's an ask ban. Edit your questions or you can't ask another, but these questions must then get responses that you accept. How would they get new responses? I dunno, you figure it out."

    Fuck SO.
Add Comment