NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: BlueLithium on December 22, 2022, 09:22:02 PM

Title: How to open disk image file
Post by: BlueLithium on December 22, 2022, 09:22:02 PM
I downloaded Windows Nashville and 98 disk image file and was wondering how to run them on NASM.
Title: Re: How to open disk image file
Post by: debs3759 on December 23, 2022, 06:13:48 AM
nasm is an assembler - it creates binary code from assembly language files. It's not a virtual machine app that you run operating systems in.
Title: Re: How to open disk image file
Post by: James2M on January 17, 2023, 04:09:44 AM
I downloaded Windows Nashville and 98 disk image file and was wondering how to run them on NASM. MyMorri Login (https://www.mymorri.net/)

Hello,
iso file directly to your desktop.
Locate your ISO file on your computer.
Right-click on the ISO file and select Open with > Choose another app.
When the window appears select the checkbox by “Always use this app to open /iso files. Then select Windows Explorer from the list.
Your ISO file is now mounted to your desktop.
Title: Re: How to open disk image file
Post by: fredericopissarra on January 17, 2023, 01:06:58 PM
I downloaded Windows Nashville and 98 disk image file and was wondering how to run them on NASM.
Since this is a forum for assembly programming, here's my answer:
Code: [Select]
; works on SysV x86-64 ABI systems
; Entry: RDI = ptr to pathname.
runFile:
  push rbx
  mov rbx,rdi
  sub  rsp,24
  mov eax,57
  syscall
  cmp eax,-1
  je .fail
  mov [rsp],rbx
  mov [rsp+8],rbx
  mov qword [rsp+16],0
  mov eax,59
  mov rdi,rbx
  mov rsi,rsp
  xor  edx,edx
  syscall
  ; only gets here if sys_execve fails.
.fail:
  add  rsp,24
  pop  rbx
  xor eax,eax
  ret