Do you always criticize new posters that are trying to help?jal wrote:Apart from the fact that there's only a single change, in a single line that could easily have been communicated in a better format than a copy/paste of an entire routine with one change, this doesn't teach anyone anything.trinopoty wrote:You have to replace [some code] with [some code]
ClrScn Funtion not working
Re: ClrScn Funtion not working
Re: ClrScn Funtion not working
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.terry wrote:Do you always criticize new posters that are trying to help?
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
Every good solution is obvious once you've found it.