terry wrote:Do you always criticize new posters that are trying to help?
Criticism is not negative
per se. Unfortunately several people here - including myself on more than one occassion - have become somewhat irritated by some of the "usual suspects" - bad behaviour that occurs again and
again and AGAIN as new people join the board, and are prone to overreaction when they (re)appear.
One of these "usual suspects" is what I would call "here's a piece of ASM code that works".
trinopoty's post was a bordercase, but apparently enough to set off jal's trigger reflex. (Note how jal, in his criticism, even
missed one of trinopoty's corrections due to their poor presentation.)
To make the criticism constructive: A diff is always best when correcting someone else's code, as it shows clearly
what has changed. Having correct code that one could copy & paste is good (for a certain definition of "good"), but
understanding what was wrong is much better.
Code: Select all
@@ -7,9 +7,9 @@
mov es, cx
mov di, 0 ; starting location (upper left corner)
mov ax, 0x0720 ; ASCII <space> character
- mov cx, 0x1920 ; # of chars on the screen (80x24)
+ mov cx, 0x0780 ; # of chars on the screen (80x24)
rep stosw
- mov byte [cursor],0 ; move cursor to the top of the screen
+ mov word [cursor], 0 ; move cursor to the top of the screen
call set_hwcursor
pop ax
pop di
In this case, the uncommented diff should already be enough, as the errors fixed are somewhat obvious. In more difficult cases, a short explanation as to
why the original code was broken and
how you fixed it is helpful.