Exam 2007 - Q 1(h)

Posted by RC
Announcements Last Post
: Programming Students at UNISA School of Computing 06/19/2019 02:01PM
SoC Curricula 09/30/2017 01:08PM
Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
School of Computing Short Learning Programmes 11/24/2014 08:37AM
Unisa contact information 07/28/2011 01:28PM
 Exam 2007 - Q 1(h) October 27, 2008 04:52AM Registered: 10 years ago Posts: 13 Rating: 0
(h) If you assemble a program using NASM, what will be the result of the assembler directive DB 4,5,6,10?

1. Four words will be reserved in memory and the values 0004, 0005, 0006 and 0010 respectively stored in these 4 words.
2. Four words will be reserved in memory and the values 0004h, 0005h, 0006h and 0010h respectively stored in these 4
words.
3. Four bytes will be reserved in memory and the values 4, 5, 6 and 10 respectively stored in these 4 bytes.
4. Four bytes will be reserved in memory and the values 4h, 5h, 6h and 10h respectively stored in these 4 bytes

I would say the answer is option (3) but TUT202 says that the answer is (4)

Any thoughts?
 Re: Exam 2007 - Q 1(h) October 27, 2008 06:43AM Registered: 14 years ago Posts: 3,015 Rating: 5
Can't remember exactly where it is - but the h must be there because you are referencing assembler.
 Re: Exam 2007 - Q 1(h) October 27, 2008 06:50AM Registered: 14 years ago Posts: 3,015 Rating: 5
Correction - "h" is for hexadecimal value.
 Re: Exam 2007 - Q 1(h) October 27, 2008 08:38AM Registered: 13 years ago Posts: 232 Rating: 0
I also say 3. It quite clearly says in the tut letter that all values are decimal unless marked hex, and I have also tested it by writing a test program and debugging it and looking at the contents of the registers. The values are definitely treated as decimal and converted when stored in memory.

-Valkeye
 Re: Exam 2007 - Q 1(h) October 27, 2008 09:39AM Registered: 13 years ago Posts: 526 Rating: 0
I'd also say 3
Sorry, only registered users may post in this forum.