Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
pistolero (p@fsebugoutzone.org)'s status on Wednesday, 04-Sep-2024 04:55:43 JST pistolero
@pernia @Inginsub @qint
> lolno. "just multiply" is reiterating the problem
Unless you want to implement multiplication yourself, you want to use the multiplication instructions. I don't know how to make that easier. mul, imul.
> you think id be asking for help if i could?
Yes, you can. I listed all of the PoC||GTFO issues that have boot-sector hacks, including complete guides. "Here is the thing you want to do, here is a list of places that tell you how to do it. All of these PDFs are also zip files that include the code."
I type "x87 fpu" into a search engine and I see this immediately: https://wiki.osdev.org/FPU .
MOV EDX, CR0 ; Start probe, get CR0
AND EDX, (-1) - (CR0_TS + CR0_EM) ; clear TS and EM to force fpu access
MOV CR0, EDX ; store control word
FNINIT ; load defaults to FPU
FNSTSW [.testword] ; store status word
CMP word [.testword], 0 ; compare the written status with the expected FPU state
JNE .nofpu ; jump if the FPU hasn't written anything (i.e. it's not there)
JMP .hasfpu
.testword: DW 0x55AA ; store garbage to be able to detect a change