Code: Select all
; wait for key press
mov ah,00h ; BIOS Scan Keycode
int 16h ; 16h = keyboard
Thanks in advance.
EDIT: I assemble with NASM and compile with DJGPP on a Win32 platform.
Code: Select all
; wait for key press
mov ah,00h ; BIOS Scan Keycode
int 16h ; 16h = keyboard
Code: Select all
void myfunc()
{
asm volatile("mov $0x00, %ah; int $0x16");
}
Sure, only if you want to overwrite the data in the file while keeping size the same. If you add/remove data then you may need to allocate/deallocate room on the disk which requires you to change the NTFS structures (which I have no clue how to go about doing it). Also, if a file extends beyond the "allocation unit size" (the name the Windows format tool gives them), then its contents may be scattered across the disk (you could defragment your drive to avoid this problem).lurner wrote:If I know exactly where a file is on disk in a NTFS; such as what sector, cluster, offset, is it possible to write to that file without doing anything special as if it was the same procedure as writing to FAT16 or something like that?