Jwasm for BareMetal Operating System ?

Started by hasanbacioglu, October 13, 2011, 07:40:44 AM

Previous topic - Next topic

hasanbacioglu

Hi guys,
  I have made acquiantence with BareMetal operating system, entirely written in x64 assembly. I am compiling some test files using yasm and nasm, both in windows and in ubuntu running in vmware. I just wanted to use jwasm in windows. But I can't do that. Here is a sample file I can compile with nasm and run in BareMetal OS.

;Argument test program
;Baremetal compile
;nasm argtest.asm -o argtest.app

[bits 64]
[org 0x0000000000200000]

%include "bmdev.asm"

start:
   call   b_get_argc
   cmp      al,1
   je      noargs
   mov      rsi,hello_message
   call   b_print_string
   mov      al,1
   call   b_get_argv
   call   b_print_string
   call   b_print_newline
   jmp      fin
noargs:
   mov      rsi,noargs_message
   call   b_print_string
fin:

ret

hello_message:   db   'Hello, ',0
noargs_message: db  'Abort: No arguments supplied.',13,0

Is it possible to use Jwasm for BareMetal OS too ? Or many operating system support does not mean any ?

Thanks in advance for your attention.

Luposian

I am quite interested in BareMetal OS.  I haven't hardly a clue how to actually program in Assembly, much less any other language, but... I would love to see this OS slowly become more usable and useful from a user-perspective.  And if I can learn something about x64 Assembly language programming along the way, all the better.

Right now, I'm trying to figure out how to get it installed on my Gateway NV55S09u laptop.  I'm not going to forsake the 500Gb HD to mess with this OS and the instructions for how to create a bootable drive are quite confusing to me, to say the least.  But I'm hoping... maybe... the SDHC slot is usable.

The programmer tells me that you can slipstream BMOS (BareMetal OS) onto a USB device, but from that point (after booting), you can't do anything with it, because there are no USB drivers for BMOS.  But I'm wondering if the SDHC slot might actually be a useable point of entry, because I don't think it falls under a standard USB controller, but a special Broadcom SDHC controller.

In other words, if the device is considered a "real" hard drive, maybe I can buy a cheap 1, 2, or 4 Gb SDHC card and mess around with getting BMOS installed!

As well, I am curious if anyone has worked on creating an Assembly language version of the multi-processor version of the Prime numbers program.  There's a C version, but I'm interested in seeing how much faster the Assembly Language version would run.

Has anyone written any other Asm software for BMOS other than what already exists on the site?

Luposian