# Ontwerp en bouw een besturingssysteem/Appendix B/GDT descriptors
## Descriptors
### Algemeen

Als bit 47 op 0 staat, is er veel ruimte in de descriptor dat door het besturingssysteem kan worden gebruikt:
| 63 | 56 |
| 55 | 48 |
| 47 | 46 | 45 | 44 | | | | 40 |
| 0 | DPL | DPL | Type | Type | Type | Type | Type |
| 39 | 32 |
| 31 | 24 |
| 23 | 16 |
| 15 | 8 |
| 7 | 0 |

### Code Segment Descriptor

| 63 | 56 |
| Basis (bits 24-31) ||||||||
| 55 | 54 | 53 | 52 | 51 | | | 48 |
| G | D | 0 | | Limiet (bits 16-19) | Limiet (bits 16-19) | Limiet (bits 16-19) | Limiet (bits 16-19) |
| 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 |
| 1 | DPL | DPL | 1 | 1 | C | R | A |
| 39 | 32 |
| Basis (bits 16-23) ||||||||
| 31 | 24 |
| Basis (bits 8-15) ||||||||
| 23 | 16 |
| Basis (bits 0-7) ||||||||
| 15 | 8 |
| Limiet (bits 8-15) ||||||||
| 7 | 0 |
| Limiet (bits 0-7) ||||||||

### Data Segment Descriptor

| 63 | 56 |
| Basis (bits 24-31) ||||||||
| 55 | 54 | 53 | 52 | 51 | | | 48 |
| G | B | 0 | | Limiet (bits 16-19) | Limiet (bits 16-19) | Limiet (bits 16-19) | Limiet (bits 16-19) |
| 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 |
| 1 | DPL | DPL | 1 | 1 | E | W | A |
| 39 | 32 |
| Basis (bits 16-23) ||||||||
| 31 | 24 |
| Basis (bits 8-15) ||||||||
| 23 | 16 |
| Basis (bits 0-7) ||||||||
| 15 | 8 |
| Limiet (bits 8-15) ||||||||
| 7 | 0 |
| Limiet (bits 0-7) ||||||||

### Call gate

| 63 | 56 |
| Segment offset (bits 24-31) ||||||||
| 55 | 48 |
| Segment offset (bits 16-23) ||||||||
| 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 |
| 1 | DPL | DPL | 0 | 1 | 1 | 0 | 0 |
| 39 | 38 | 37 | 36 | | | | 32 |
| 0 | 0 | 0 | Aantal param. | Aantal param. | Aantal param. | Aantal param. | Aantal param. |
| 31 | 24 |
| Segment selector (bits 8-15) ||||||||
| 23 | 16 |
| Segment selector (bits 0-7) ||||||||
| 15 | 8 |
| Segment offset (bits 8-15) ||||||||
| 7 | 0 |
| Segment offset (bits 0-7) ||||||||

### TSS Descriptor

| 63 | 56 |
| Basis (bits 24-31) ||||||||
| 55 | 54 | 53 | 52 | 51 | | | 48 |
| G | 0 | 0 | | Limiet (bits 16-19) | Limiet (bits 16-19) | Limiet (bits 16-19) | Limiet (bits 16-19) |
| 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 |
| 1 | DPL | DPL | 0 | 1 | 0 | B | 1 |
| 39 | 32 |
| Basis (bits 16-23) ||||||||
| 31 | 24 |
| Basis (bits 8-15) ||||||||
| 23 | 16 |
| Basis (bits 0-7) ||||||||
| 15 | 8 |
| Limiet (bits 8-15) ||||||||
| 7 | 0 |
| Limiet (bits 0-7) ||||||||

### Task gate

| 63 | 56 |
| 55 | 48 |
| 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 |
| 1 | DPL | DPL | 0 | 0 | 1 | 0 | 1 |
| 39 | 32 |
| 31 | 24 |
| TSS segment selector (bits 8-15) ||||||||
| 23 | 16 |
| TSS segment selector (bits 0-7) ||||||||
| 15 | 8 |
| 7 | 0 |

### Interrupt gate

| 63 | 56 |
| Offset (bits 24-31) ||||||||
| 55 | 48 |
| Offset (bits 16-19) ||||||||
| 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 |
| 1 | DPL | DPL | 0 | D | 1 | 1 | 0 |
| 39 | 38 | 37 | 36 | 32 |
| 0 | 0 | 0 | | |
| 31 | 24 |
| Segment selector (bits 8-15) ||||||||
| 23 | 16 |
| Segment selector (bits 0-7) ||||||||
| 15 | 8 |
| Offset (bits 8-15) ||||||||
| 7 | 0 |
| Offset (bits 0-7) ||||||||

### Trap gate

| 63 | 56 |
| Offset (bits 24-31) ||||||||
| 55 | 48 |
| Offset (bits 16-19) ||||||||
| 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 |
| 1 | DPL | DPL | 0 | D | 1 | 1 | 1 |
| 39 | 38 | 37 | 36 | 32 |
| 0 | 0 | 0 | | |
| 31 | 24 |
| Segment selector (bits 8-15) ||||||||
| 23 | 16 |
| Segment selector (bits 0-7) ||||||||
| 15 | 8 |
| Offset (bits 8-15) ||||||||
| 7 | 0 |
| Offset (bits 0-7) ||||||||

### Task gate descriptor

| 63 | 56 |
| 55 | 48 |
| 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 |
| 1 | DPL | DPL | 0 | 0 | 1 | 0 | 1 |
| 39 | 32 |
| 31 | 24 |
| TSS segment selector (bits 8-15) ||||||||
| 23 | 16 |
| TSS segment selector (bits 0-7) ||||||||
| 15 | 8 |
| 7 | 0 |