Code: proc cpu_test near
xor ax, ax ; Begin FLAG test of CPU jb @@halt jo @@halt js @@halt jnz @@halt jpo @@halt add ax, 1 jz @@halt jpe @@halt sub ax, 8002h js @@halt inc ax jno @@halt shl ax, 1 jnb @@halt jnz @@halt shl ax, 1 jb @@halt
mov bx, 0101010101010101b ; Begin REGISTER test of CPU @@cpu_test: mov bp, bx mov cx, bp mov sp, cx mov dx, sp mov ss, dx mov si, ss mov es, si mov di, es mov ds, di mov ax, ds cmp ax, 0101010101010101b jnz @@cpu_1 not ax mov bx, ax jmp @@cpu_test
@@cpu_1: xor ax, 1010101010101010b jnz @@halt jmp cpu_ok
@@halt: hlt
endp cpu_test
|