|
Revision 4cc0c3ab6541753b89cba58c345c0cae8c7d151d, 469 bytes
(checked in by H. Peter Anvin <hpa@…>, 3 years ago)
|
|
core: rename .text, .data and .bss to .text16, .data16, .bss16
Rename the .text, .data and .bss sections to .text16, .data16 and
.bss16, in anticipation of being linked with compiler-generated 32-bit
code, which presumably would like to use the standard section names.
Signed-off-by: H. Peter Anvin <hpa@…>
|
-
Property mode set to
100644
|
| Line | |
|---|
| 1 | ; |
|---|
| 2 | ; writechr: Write a single character in AL to the console without |
|---|
| 3 | ; mangling any registers; handle video pages correctly. |
|---|
| 4 | ; |
|---|
| 5 | section .text16 |
|---|
| 6 | |
|---|
| 7 | writechr: |
|---|
| 8 | call write_serial ; write to serial port if needed |
|---|
| 9 | pushfd |
|---|
| 10 | test byte [cs:UsingVGA], 08h |
|---|
| 11 | jz .videook |
|---|
| 12 | call vgaclearmode |
|---|
| 13 | .videook: |
|---|
| 14 | test byte [cs:DisplayCon], 01h |
|---|
| 15 | jz .nothing |
|---|
| 16 | pushad |
|---|
| 17 | mov ah,0Eh |
|---|
| 18 | mov bl,07h ; attribute |
|---|
| 19 | mov bh,[cs:BIOS_page] ; current page |
|---|
| 20 | int 10h |
|---|
| 21 | popad |
|---|
| 22 | .nothing: |
|---|
| 23 | popfd |
|---|
| 24 | ret |
|---|