Page 1 of 1

Stack selector question

Posted: Sat Sep 20, 2003 11:00 pm
by Neo
How do i set up a stack segment selector descriptor i tried this but keep getting an error. what is wrong
STACK_SEL equ $-gdt_start
dw 0x0000 ; Limit(1):0x0000
dw 0xffff ; Base(3)
db 0x0e ; Base(2)
db 0x96 ; Type // 0x92 also gives error
db 0x41 ; Limit(1):0x4 | Flags:1byte inc,32bit (01000001)
db 0x00 ; Base(1)

when i move this to SS and then 0xffff to SP i get an error in BOCHS. How do i set up a 64k stack descriptor

RE:Stack selector question

Posted: Sat Sep 20, 2003 11:00 pm
by mindvnas
always align esp on 4 byte boundary (fffc)