Stack selector question

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.
Post Reply
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Stack selector question

Post 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
Only Human
mindvnas

RE:Stack selector question

Post by mindvnas »

always align esp on 4 byte boundary (fffc)
Post Reply