Author Topic: Bare Command line arguments  (Read 7776 times)

Offline macaswell

  • Jr. Member
  • *
  • Posts: 16
Bare Command line arguments
« 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?
« Last Edit: December 06, 2010, 05:19:58 PM by macaswell »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Bare Command line arguments
« Reply #1 on: December 06, 2010, 10:29:41 PM »
No.

Best,
Frank


Offline macaswell

  • Jr. Member
  • *
  • Posts: 16
Re: Bare Command line arguments
« Reply #2 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.