Close

Results 1 to 6 of 6
  1. #1
    DF VIP Member OrangeJuicey's Avatar
    Join Date
    Aug 2006
    Location
    London
    Posts
    1,283
    Thanks
    1
    Thanked:        4
    Karma Level
    289

    Default Assembly Language. Getting STDIN

    Ok i just wanted to know, in assembler how you would get input? firstly from the command prompt but eventually from a file.

    I was thinking that I'm gonna have to use some C which i'm not familiar with. I'm I on the right track thinking that i'll need to use the %eax register and push the data on to a stack.

    Quick edit, i'm using Linux and Pentium Assembler.

  2. #2
    DF VIP Member /dev/null's Avatar
    Join Date
    Feb 2004
    Location
    Behind You
    Posts
    2,952
    Thanks
    0
    Thanked:        0
    Karma Level
    450

    Default Re: Assembly Language. Getting STDIN

    Interrupts....

    http://www.ctyme.com/intr/int.htm

    int 21 (with appropriate parameters for ah/ax of course) is your friend...

    http://www.ctyme.com/intr/int-21.htm


    It's a piece of piss to read stdin or a file from c. If you have no specific reason to use assembly then I would choose c - vey few lines of (very simple) code (including error checking ) to read from a file etc.

  3. #3
    DF VIP Member blacksheep's Avatar
    Join Date
    Jun 2006
    Location
    Manchester
    Posts
    3,877
    Thanks
    87
    Thanked:        265
    Karma Level
    545

    Default Re: Assembly Language. Getting STDIN

    I'm with John on this - if you have no reason then C is vv easy to do this with and speed/performance wise you probably wouldn't notice a difference between c and assembly

  4. #4
    DF VIP Member OrangeJuicey's Avatar
    Join Date
    Aug 2006
    Location
    London
    Posts
    1,283
    Thanks
    1
    Thanked:        4
    Karma Level
    289

    Default Re: Assembly Language. Getting STDIN

    Thanks guys. I have to use assembler its not my choice. I can't use C either to be honest i'm a java & ada programmer. Got stuck in to the assembly book getting the hang of things now.

  5. #5
    DF VIP Member /dev/null's Avatar
    Join Date
    Feb 2004
    Location
    Behind You
    Posts
    2,952
    Thanks
    0
    Thanked:        0
    Karma Level
    450

    Default Re: Assembly Language. Getting STDIN

    Going from java to c should be no problem at all - very simlar syntax, just get your head around the memory management and you're away.

  6. #6
    DF VIP Member
    RhinoBanga's Avatar
    Join Date
    Nov 2000
    Location
    127.0.0.1
    Posts
    1,780
    Thanks
    20
    Thanked:        13
    Karma Level
    388

    Default Re: Assembly Language. Getting STDIN

    Quote Originally Posted by John Keymer View Post
    Going from java to c should be no problem at all - very simlar syntax, just get your head around the memory management and you're away.
    LOL ... shouldn't that be the lack of memory management

Similar Threads

  1. Official language
    By PAULM8 in forum The Comedy Club
    Replies: 6
    Last Post: 26th February 2003, 01:47 PM
  2. Laser Assembly
    By sligoman in forum Sony Consoles
    Replies: 1
    Last Post: 12th December 2002, 08:12 PM
  3. v4 ps2 power supply board & tray assembly
    By Robbie Vox in forum Buy, Sell and Trade
    Replies: 1
    Last Post: 8th October 2002, 11:51 AM
  4. Laptop language prob!!
    By hotentot in forum PC Problems
    Replies: 3
    Last Post: 6th September 2002, 01:57 AM

Social Networking Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •