flat assembler
Message board for the users of flat assembler.

Index > Heap > x86 Assembly language quiz

Author
Thread Post new topic Reply to topic
peter



Joined: 09 May 2006
Posts: 63
peter
Here is my quiz for assembly programmers:

The quiz
Discussion

Check yourself: how well do you know assembly language. And please post your comments and suggestions.
Post 27 Mar 2007, 03:30
View user's profile Send private message Visit poster's website Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
quite an easy one), but few questions mede me think and remember (as like with PANDN) and i passed it all (16).
Post 27 Mar 2007, 10:07
View user's profile Send private message Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias
three comments, don't know if they will prove useful to you or anyone else--these are highly prejudicial, and rather inflammatory, probably therefore, quite worthless:
1. I don't personally think of Assembly language as an adjunct to "C" programming, so, I don't define programs in terms of "C", though I recognize that many, many, (ok, maybe most, maybe everyone else except me!) people do regard "C" as the standard....I think of assembly language as permitting access to the hardware, and your quiz did not test that aspect of the language to my satisfaction....
2. From a didactic perspective, that is from the point of view of using the quiz as a teaching tool, rather than a tool for evaluation, it would be improved, in my opinion, by providing immediate feedback, as to the "correct" answer, question by question, rather than waiting until the end of the quiz. An unfortunate bug in your program not only refused to provide the "correct" answer, upon clicking the appropriate icon, but also erased the half dozen questions which had been answered, without indicating the errors or the rationale for choosing the "correct" response. Some of the "correct" choices were less than optimal implementations of the programming assignment.
3. Assuming this quiz is used in a university environment, rather than a convocation of like minded FASM CODERS, hackers, and obscurantists, then your illustrations suffer from the two common faults of encouraging POOR programming practice with the infernal @@@ signs instead of using a proper label, and misusing the Boolean operator XOR, instead of MOV.
Your English vocabulary is also in error, for choosing the word "clean", instead of "clear". At least one of your questions was banal, asking how many bytes were required for an INT instruction---WHO CARES? That may have been important 50 years ago, when memory cost more than groceries, but these days memory is free. Testing knowledge of how to write PROGRAMS, instead of junky code, is far more important than saving 900,000 bytes of memory. Further, if someone is interested in knowing the precise answer to that question, then, one need simply consult an Intel reference manual. In summary, I found that the absence of questions about protected mode programming, proper programming practices, hardware access, and data structure elaboration, together with the unnnecessary insistance on defining programming tasks in terms of "C", left your quiz quite useless.
Post 27 Mar 2007, 10:20
View user's profile Send private message Reply with quote
peter



Joined: 09 May 2006
Posts: 63
peter
to asmfan:
Congratulations!

to tom tobias:
1. You could describe the task in natural language ("fill the array of dwords with the ascending values from 0 to 9"), in pseudocode, or in some high-level language. I chose the last way and used C language. For me, the program in C is faster to read than the description in English (and I didn't want to invent my own pseudocode language, as John Bently did in the second edition of Programming Pearls).

About access to hardware and protected mode programming: it may be a good idea, but I have no experience in writing drivers and OSes, so I cannot write such quiz.

2. Thank you, I will think about asking one question per page. I modeled this quiz after http://www.funtrivia.com/ (their interface is handy, though the content of the quizes varies in quality). Another well-known site, Infoplease (http://www.infoplease.com/quizzes/), uses a one-question-per-page interface that you described.

3. INT3 question is not about choosing the shortest instruction, it's about using INT3 for debugging purposes. Read the explanation in the quiz one more time.

Generally, I tried to keep balance between trivia questions (such as "What does XOR eax, eax do?" or "How long is INT3?") and the questions that need some thinking (such as the one about PANDN). Without trivia questions, the quiz will be too difficult and boring.

Finally, thank you for correcting my English Smile. Writing the PHP script took a plenty of time; I was tired and overlooked some spelling errors.
Post 27 Mar 2007, 13:59
View user's profile Send private message Visit poster's website Reply with quote
Plue



Joined: 15 Dec 2005
Posts: 151
Plue
None of the answers to question 5 are correct.

Edit: But if we disregard that none of them are correct, two of them are equally correct depending on how a[] is declared.
Post 27 Mar 2007, 14:50
View user's profile Send private message Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
MOV dword[...] tells us that used dword operands)
Post 27 Mar 2007, 17:50
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.