//---------------------------------------------------------------- // idnumber.s // // This program will use the 'getpid' system-call to obtain // its own PID (Process Identification Number), and then it // will display that 16-bit integer using base 10 notation. // // assemble using: $ as idnumber.s -o idnumber.o // and link using: $ ld idnumber.o -o idnumber // // programmer: // written on: 16 MAY 2006 //---------------------------------------------------------------- .section .data pid: .short 0 # stores a 16-bit integer msg: .ascii "\n\t\tpid = " # message to report PID val: .ascii " \n\n" # buffer for digit-string