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

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: New VGA mode?

Post 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.
NunoLava1998
Member
Member
Posts: 273
Joined: Sun Oct 09, 2016 4:38 am
Libera.chat IRC: NunoLava1998

Re: New VGA mode?

Post 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.
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

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

Post 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?
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

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

Post 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.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Post Reply