LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: Balaji V. Iyer<bviyer@n...>
    Date: Mon Apr 25 02:08:05 CEST 2005
    Subject: [openrisc] Syscall Argument Passing
    Top
    Hello Everyone,

    I have a question about how syscalls are handled in OpenRISC 1200. Ok
    let's say we have to use the _read function, and "read" generally has 3
    arguements taken in, they are:

    int read (int fd, char *buffer, int nbyte)


    How are the values for fd, *buffer and nbyte passed into the function? Are
    they passed through the parameter registers (r3, r4, r5 respectively,)
    and the sys function will automatically know these registers to sample? Or
    are they pushed into the stack with the stack base address stored at a
    certain place (like the stack pointer, r1)?

    Any help is appreciated.

    Thanking You,

    Yours Sincerely,

    Balaji V. Iyer.

    Follow upAuthor
    [openrisc] Syscall Argument PassingMatjaz Breskvar

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.