flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Help to write driver to write into console in real mode |
Author |
|
bitRAKE 20 Dec 2018, 23:29
If you can calculate the addresses then the general solution is a PUSH/POP. In the rare case you don't have a stack, you'll need to store the value in a temporary register or memory space.
|
|||
20 Dec 2018, 23:29 |
|
revolution 21 Dec 2018, 01:31
Fulgurance, do you mean computing the address of the characters on the text mode screen?
Something like this: address = (y * 80 + x) * 2 + base Where x and y are the coordinates of the character and the "* 2" is for two bytes per character, with the final "base" being the screen buffer start address. To do that in code you need to write a sequence of instructions with intermediate values. It can't be done with a single "mov [(y * 80 + x) * 2 + base],character". |
|||
21 Dec 2018, 01:31 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.