NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: macaswell on December 06, 2010, 03:57:31 PM

Title: Bare Command line arguments
Post by: macaswell on December 06, 2010, 03:57:31 PM
Okay,
   So I've written my OS out of nasm, Casnix OS/I (casnix.sourceforge.net).  Now I'm writing Casnix OS/II, and I'm stuck on a problem with the CLI portion of the kernel.
   I want to be able to pass command line arguments to a program.  I was thinking of moving the command line arguments into al, and have the program (cat in this case) pull al.

Example:
Code: [Select]
; =========================
; Casnix OS/II
; =========================

CLI call:
     mov al, cmd_line
     call os_load_file

CAT call:
     mov bx, al
     ; rest of code here

Would this work?  Has anyone else done something like this?
Title: Re: Bare Command line arguments
Post by: Frank Kotler on December 06, 2010, 10:29:41 PM
No.

Best,
Frank

Title: Re: Bare Command line arguments
Post by: macaswell on December 18, 2010, 12:29:49 AM
No (I'm answering myself).  It depends on the kernel's method of memory management.

In my case, my [first] post is [partially] correct.  But still, no.