1 ; pcboot - bootable PC demo/game kernel
2 ; Copyright (C) 2018-2023 John Tsiombikas <nuclear@member.fsf.org>
4 ; This program is free software: you can redistribute it and/or modify
5 ; it under the terms of the GNU General Public License as published by
6 ; the Free Software Foundation, either version 3 of the License, or
7 ; (at your option) any later version.
9 ; This program is distributed in the hope that it will be useful,
10 ; but WITHOUT ANY WARRANTY, without even the implied warranty of
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ; GNU General Public License for more details.
14 ; You should have received a copy of the GNU General Public License
15 ; along with this program. If not, see <https://www.gnu.org/licenses/>.
19 ; memory reserved for setup_selectors
22 ; memory reserved for set_gdt
27 ; setup_selectors(uint16_t code, uint16_t data)
28 ; loads the requested selectors to all the selector registers
29 global setup_selectors
31 ; set data selectors directly
37 ;mov fs, ax ; XXX don't touch fs, we use it to store initial seg
38 ; set cs using a long jump
41 mov dword [off], .ldcs
45 ; set_gdt(uint32_t addr, uint16_t limit)
46 ; loads the GDTR with the new address and limit for the GDT
56 ; set_task_reg(uint16_t tss_selector)
57 ; loads the TSS selector in the task register
64 ; vi:set ts=8 sts=8 sw=8 ft=nasm: