Page 2 of 2

Re: New VGA mode?

Posted: Mon Oct 17, 2016 1:40 am
by iansjack
NunoLava1998 wrote: I do not want to set 0x13 every single time the CPU executes KMAIN, so i set it at the start, THEN jump to KMAIN and start the loop.
For future reference note that the "jmp" instruction has no effect other than to waste a few cpu cycles and a little RAM.

Re: New VGA mode?

Posted: Mon Oct 17, 2016 3:37 am
by NunoLava1998
iansjack wrote:
NunoLava1998 wrote: I do not want to set 0x13 every single time the CPU executes KMAIN, so i set it at the start, THEN jump to KMAIN and start the loop.
For future reference note that the "jmp" instruction has no effect other than to waste a few cpu cycles and a little RAM.
and jump to the specified location.

Re: New VGA mode? [someone please lock this or something]

Posted: Mon Oct 17, 2016 4:05 am
by iansjack
I meant that it has no effect in this context.

Think about it - what location does it jump to, and what location would you go to without that particular line?

Re: New VGA mode? [someone please lock this or something]

Posted: Mon Oct 17, 2016 7:45 am
by Schol-R-LEA
As iansjack says, the real issue with the jump to KMAIN is that the label for KMAIN is the next instruction after the jump. I almost get the impression that you think you have to jump to it, in order to start the loop correctly, rather than simply falling through it.

Also, regarding the question of why you are using that particular video mode, you seem to have misunderstood my point. Why that mode - VGA 0x13 - as opposed to other VGA modes? There is a specific reason why the original coder chose that mode for his example code, one having to do with how that mode differs from the other VGA graphics modes, and I was wondering if you understood it.

Again, I'm not doing this to harass you, but to point out that your approach to this isn't likely to work. You really need to re-think how you are doing this if you want to get much further. You seem to be intelligent enough that you can, given time, understand the issues, but you keep grabbing for shortcuts and it is going to keep biting you if you do that.