![]() In return, CX would have the number of bytes actually read. DX contains the address of buffer in memory that would force the MS-DOS I/O to terminate the printing. The input string may not contain a $ character because The buffer must have 3 more rooms to save the (the maximum character to read) is in CX register. ![]() for unsigned integer: -1 is assumed 65535. value 3187, this function call itself (printud) prints the value of AX register in unsigned printd again for the quotient, and then we if the quotient is not zero, we first call print 5, we add '0' to it to make it '5'. In ASCII format, we should add '0' to it. DX contains the remainder, but since DX < 10 if quotient is zero, then print remainder if negative value, print - and call again with -value printd is called for the negate of value. If the value is negative, a - is printed then If the value to print is less than 10, then it is value 3187, this function call itself (printd) This function uses a recursive algorithm to print prints the value of AX register in signed call getstr to read a string from keyboard ![]() 3 extra places to store return/new-line and '$' The size of buffer is an adjustable constant A new-line (return character) would mark characters from keyboard, and prints it back. This program reads a string of at most 32 This program reads a string from keyboard and prints it back. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |