Today I was playing with my old computer and trying to use 16-bits Assembly inside Delphi. It's works fine with 32-bits but I always had problem when I used interrupts. Blue Screen or Freezing, that was making me believe that's not possible to do it. I'm on Windows 98 and using Delphi 7, using this simple code.
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils, Windows;
begin
asm
mov ax,$0301
mov bx,$0200
mov cx,$0001
xor dx,dx
int $13
int $20
end;
MessageBox(0,'Okay','Okay',MB_OK);
end.
To "format" a diskkete on the Floppy drive. There's a way to use it on Delphi 7 without freezing and blues screens? Or Delphi only allows to use 32-bits Assembly? Am I doing something wrong?
As long as your application is built as "32-bit Windows" application, the interrupts cannot work since these interrupts are simply not mapped.
You could try to compile your application as a "16-bit Console" application. I don't know if Delphi supports this, but that's my best guess for getting the emulation of
int 0x13
andint 0x10
.By the way, shouldn't your assembly code use hexadecimal numbers, like this:?
As it is now, you are probably calling interrupt $0d, which according to Ralf Brown's Interrupt List means: