flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > FASM syntax question |
Author |
|
nkeck72 05 Jan 2016, 01:25
When I was doing a test compile to see how FASM liked my syntax, it appeared to choke on one bit of code:
Code: ; Our Kernel API is now loaded, so we need to set our IVT values. xor ax, ax xor bx, bx xor cx, cx xor dx, dx mov es, bx mov ax, 8000h mov bx, 0000h ; Just to make sure mov [0000:21h*4+2], bx mov [0000:21h*4], ax sti In particular, FASM did not like these lines: Code: mov [0000:21h*4+2], bx mov [0000:21h*4], ax These lines are needed to get the IVT address values in the right place, and just short of making the processor calculate these at runtime I have no idea how I would make this work. What I am trying to do is make the the segment address appear at (0x21 * 4d), with the offset at (0x21 * 4d) + 2d. Help! _________________ It may look hard, but it won't take long if you take it one byte at a time. NOS: www.github.com/nkeck720/nos |
|||
05 Jan 2016, 01:25 |
|
nkeck72 05 Jan 2016, 01:54
Thanks, will try!
That "Just to make sure" line comes from back in my DOS programming days when me and a friend were working on this one program, and my friend wrote a bit of code that had to do two INT 21 calls one after the other, both the AH=09h function. He had written something like this: Code: mov ah, 09h mov dx, string_1 int 21h mov ah, 09h mov dx, string_2 int 21h When I asked him why he did this, his immediate response was "I don't trust DOS with my registers." I still laugh at that sometimes, and I guess it rubbed off on me to the point that now I don't even trust the processor with my registers! |
|||
05 Jan 2016, 01:54 |
|
l_inc 05 Jan 2016, 02:07
nkeck72
Right. And the Math with your numbers! ^_^ _________________ Faith is a superposition of knowledge and fallacy |
|||
05 Jan 2016, 02:07 |
|
Tomasz Grysztar 09 Jan 2016, 09:49
l_inc wrote:
|
|||
09 Jan 2016, 09:49 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.