How to enable/show mouse cursor on bootloader-screen?
BITS 16
jmp short _start ; Jump past disk description section
nop
; Disk description table, to make it a valid usb
OEMLabel db "usb-label" ; Disk label
BytesPerSector dw 512 ; Bytes per sector
SectorsPerCluster db 1 ; Sectors per cluster
ReservedForBoot dw 1 ; Reserved sectors for boot record
NumberOfFats db 2 ; Number of copies of the FAT
RootDirEntries dw 224
LogicalSectors dw 2880 ; Number of logical sectors
MediumByte db 0F0h ; Medium descriptor byte
SectorsPerFat dw 9 ; Sectors per FAT
SectorsPerTrack dw 18 ; Sectors per track (36/cylinder)
Sides dw 2 ; Number of sides/heads
HiddenSectors dd 0 ; Number of hidden sectors
LargeSectors dd 0 ; Number of LBA sectors
DriveNo dw 0 ; Drive No: 0
Signature db 41 ; Drive signature: 41 for floppy
VolumeID dd 87654321h ; Volume ID: any number
VolumeLabel db "usb-lable"; Volume Label: any 11 chars
FileSystem db "FAT12 " ; File system type: don't change!
_start:
mov ax, 07C0h ; move 0x7c00 into ax
mov ds, ax ; set data segment to where we're loaded
mov si, string ; Put string position into SI
call print_string ; Call our string-printing routine
jmp $ ; infinite loop!
string db "hello world! from usb", 0
print_string:
mov ah, 0Eh ; int 10h 'print char' function
.loop:
lodsb ; load string byte to al
cmp al, 0 ; cmp al with 0
je .done ; if char is zero, ret
int 10h ; else, print
jmp .loop
.done:
ret
times 510-($-$$) db 0 ; Pad remainder of boot sector with 0s
dw 0xAA55 ; The standard PC boot signature
We've made this bootloader which prints "hello world" and it works! Now, we want to show the mouse cursor on the bootloader screen and we have already used int 33
(mouse enabling interupt) in bootloader but it doesn't show the cursor! [we have not studied OS course yet.]
assembly x86 usb bootloader mouse-cursor
migrated from superuser.com Dec 26 '18 at 9:28
This question came from our site for computer enthusiasts and power users.
add a comment |
BITS 16
jmp short _start ; Jump past disk description section
nop
; Disk description table, to make it a valid usb
OEMLabel db "usb-label" ; Disk label
BytesPerSector dw 512 ; Bytes per sector
SectorsPerCluster db 1 ; Sectors per cluster
ReservedForBoot dw 1 ; Reserved sectors for boot record
NumberOfFats db 2 ; Number of copies of the FAT
RootDirEntries dw 224
LogicalSectors dw 2880 ; Number of logical sectors
MediumByte db 0F0h ; Medium descriptor byte
SectorsPerFat dw 9 ; Sectors per FAT
SectorsPerTrack dw 18 ; Sectors per track (36/cylinder)
Sides dw 2 ; Number of sides/heads
HiddenSectors dd 0 ; Number of hidden sectors
LargeSectors dd 0 ; Number of LBA sectors
DriveNo dw 0 ; Drive No: 0
Signature db 41 ; Drive signature: 41 for floppy
VolumeID dd 87654321h ; Volume ID: any number
VolumeLabel db "usb-lable"; Volume Label: any 11 chars
FileSystem db "FAT12 " ; File system type: don't change!
_start:
mov ax, 07C0h ; move 0x7c00 into ax
mov ds, ax ; set data segment to where we're loaded
mov si, string ; Put string position into SI
call print_string ; Call our string-printing routine
jmp $ ; infinite loop!
string db "hello world! from usb", 0
print_string:
mov ah, 0Eh ; int 10h 'print char' function
.loop:
lodsb ; load string byte to al
cmp al, 0 ; cmp al with 0
je .done ; if char is zero, ret
int 10h ; else, print
jmp .loop
.done:
ret
times 510-($-$$) db 0 ; Pad remainder of boot sector with 0s
dw 0xAA55 ; The standard PC boot signature
We've made this bootloader which prints "hello world" and it works! Now, we want to show the mouse cursor on the bootloader screen and we have already used int 33
(mouse enabling interupt) in bootloader but it doesn't show the cursor! [we have not studied OS course yet.]
assembly x86 usb bootloader mouse-cursor
migrated from superuser.com Dec 26 '18 at 9:28
This question came from our site for computer enthusiasts and power users.
You can't useInt 33h
MS mouse interrupts in a bootloader because those interrupts aren't available until DOS is running and it has installed the MS Mouse driver. You will effectively have to write your own mouse code and update the cursor yourself. This would involve replacing the mouse interrupt with your own, reading the PS/2 port for data, building up a mouse packet and then processing the coordinates in the packet and then place a cursor on the screen at that location.
– Michael Petch
Dec 26 '18 at 18:26
can you please guide me through the process, or recommend me some good source on this, as I am an absolute beginner in os and working to solve this issue from a while now.
– linxnerd
Dec 27 '18 at 4:12
As a beginner this requires a fair amount of knowledge to pull off. Understanding interrupts; how to hook the interrupts in real mode; accessing the PS/2 controller and PS/2 device (assuming PS/2 style mouse);how to update the video display to fake a mouse cursor etc. OSDev Wiki has information on working with the mouse: wiki.osdev.org/Mouse_Input . More info on working with the PS/2 controller can be found here: wiki.osdev.org/%228042%22_PS/2_Controller
– Michael Petch
Dec 27 '18 at 4:21
add a comment |
BITS 16
jmp short _start ; Jump past disk description section
nop
; Disk description table, to make it a valid usb
OEMLabel db "usb-label" ; Disk label
BytesPerSector dw 512 ; Bytes per sector
SectorsPerCluster db 1 ; Sectors per cluster
ReservedForBoot dw 1 ; Reserved sectors for boot record
NumberOfFats db 2 ; Number of copies of the FAT
RootDirEntries dw 224
LogicalSectors dw 2880 ; Number of logical sectors
MediumByte db 0F0h ; Medium descriptor byte
SectorsPerFat dw 9 ; Sectors per FAT
SectorsPerTrack dw 18 ; Sectors per track (36/cylinder)
Sides dw 2 ; Number of sides/heads
HiddenSectors dd 0 ; Number of hidden sectors
LargeSectors dd 0 ; Number of LBA sectors
DriveNo dw 0 ; Drive No: 0
Signature db 41 ; Drive signature: 41 for floppy
VolumeID dd 87654321h ; Volume ID: any number
VolumeLabel db "usb-lable"; Volume Label: any 11 chars
FileSystem db "FAT12 " ; File system type: don't change!
_start:
mov ax, 07C0h ; move 0x7c00 into ax
mov ds, ax ; set data segment to where we're loaded
mov si, string ; Put string position into SI
call print_string ; Call our string-printing routine
jmp $ ; infinite loop!
string db "hello world! from usb", 0
print_string:
mov ah, 0Eh ; int 10h 'print char' function
.loop:
lodsb ; load string byte to al
cmp al, 0 ; cmp al with 0
je .done ; if char is zero, ret
int 10h ; else, print
jmp .loop
.done:
ret
times 510-($-$$) db 0 ; Pad remainder of boot sector with 0s
dw 0xAA55 ; The standard PC boot signature
We've made this bootloader which prints "hello world" and it works! Now, we want to show the mouse cursor on the bootloader screen and we have already used int 33
(mouse enabling interupt) in bootloader but it doesn't show the cursor! [we have not studied OS course yet.]
assembly x86 usb bootloader mouse-cursor
BITS 16
jmp short _start ; Jump past disk description section
nop
; Disk description table, to make it a valid usb
OEMLabel db "usb-label" ; Disk label
BytesPerSector dw 512 ; Bytes per sector
SectorsPerCluster db 1 ; Sectors per cluster
ReservedForBoot dw 1 ; Reserved sectors for boot record
NumberOfFats db 2 ; Number of copies of the FAT
RootDirEntries dw 224
LogicalSectors dw 2880 ; Number of logical sectors
MediumByte db 0F0h ; Medium descriptor byte
SectorsPerFat dw 9 ; Sectors per FAT
SectorsPerTrack dw 18 ; Sectors per track (36/cylinder)
Sides dw 2 ; Number of sides/heads
HiddenSectors dd 0 ; Number of hidden sectors
LargeSectors dd 0 ; Number of LBA sectors
DriveNo dw 0 ; Drive No: 0
Signature db 41 ; Drive signature: 41 for floppy
VolumeID dd 87654321h ; Volume ID: any number
VolumeLabel db "usb-lable"; Volume Label: any 11 chars
FileSystem db "FAT12 " ; File system type: don't change!
_start:
mov ax, 07C0h ; move 0x7c00 into ax
mov ds, ax ; set data segment to where we're loaded
mov si, string ; Put string position into SI
call print_string ; Call our string-printing routine
jmp $ ; infinite loop!
string db "hello world! from usb", 0
print_string:
mov ah, 0Eh ; int 10h 'print char' function
.loop:
lodsb ; load string byte to al
cmp al, 0 ; cmp al with 0
je .done ; if char is zero, ret
int 10h ; else, print
jmp .loop
.done:
ret
times 510-($-$$) db 0 ; Pad remainder of boot sector with 0s
dw 0xAA55 ; The standard PC boot signature
We've made this bootloader which prints "hello world" and it works! Now, we want to show the mouse cursor on the bootloader screen and we have already used int 33
(mouse enabling interupt) in bootloader but it doesn't show the cursor! [we have not studied OS course yet.]
assembly x86 usb bootloader mouse-cursor
assembly x86 usb bootloader mouse-cursor
edited Dec 26 '18 at 18:29
Michael Petch
25.3k556101
25.3k556101
asked Dec 26 '18 at 6:31
linxnerdlinxnerd
61
61
migrated from superuser.com Dec 26 '18 at 9:28
This question came from our site for computer enthusiasts and power users.
migrated from superuser.com Dec 26 '18 at 9:28
This question came from our site for computer enthusiasts and power users.
You can't useInt 33h
MS mouse interrupts in a bootloader because those interrupts aren't available until DOS is running and it has installed the MS Mouse driver. You will effectively have to write your own mouse code and update the cursor yourself. This would involve replacing the mouse interrupt with your own, reading the PS/2 port for data, building up a mouse packet and then processing the coordinates in the packet and then place a cursor on the screen at that location.
– Michael Petch
Dec 26 '18 at 18:26
can you please guide me through the process, or recommend me some good source on this, as I am an absolute beginner in os and working to solve this issue from a while now.
– linxnerd
Dec 27 '18 at 4:12
As a beginner this requires a fair amount of knowledge to pull off. Understanding interrupts; how to hook the interrupts in real mode; accessing the PS/2 controller and PS/2 device (assuming PS/2 style mouse);how to update the video display to fake a mouse cursor etc. OSDev Wiki has information on working with the mouse: wiki.osdev.org/Mouse_Input . More info on working with the PS/2 controller can be found here: wiki.osdev.org/%228042%22_PS/2_Controller
– Michael Petch
Dec 27 '18 at 4:21
add a comment |
You can't useInt 33h
MS mouse interrupts in a bootloader because those interrupts aren't available until DOS is running and it has installed the MS Mouse driver. You will effectively have to write your own mouse code and update the cursor yourself. This would involve replacing the mouse interrupt with your own, reading the PS/2 port for data, building up a mouse packet and then processing the coordinates in the packet and then place a cursor on the screen at that location.
– Michael Petch
Dec 26 '18 at 18:26
can you please guide me through the process, or recommend me some good source on this, as I am an absolute beginner in os and working to solve this issue from a while now.
– linxnerd
Dec 27 '18 at 4:12
As a beginner this requires a fair amount of knowledge to pull off. Understanding interrupts; how to hook the interrupts in real mode; accessing the PS/2 controller and PS/2 device (assuming PS/2 style mouse);how to update the video display to fake a mouse cursor etc. OSDev Wiki has information on working with the mouse: wiki.osdev.org/Mouse_Input . More info on working with the PS/2 controller can be found here: wiki.osdev.org/%228042%22_PS/2_Controller
– Michael Petch
Dec 27 '18 at 4:21
You can't use
Int 33h
MS mouse interrupts in a bootloader because those interrupts aren't available until DOS is running and it has installed the MS Mouse driver. You will effectively have to write your own mouse code and update the cursor yourself. This would involve replacing the mouse interrupt with your own, reading the PS/2 port for data, building up a mouse packet and then processing the coordinates in the packet and then place a cursor on the screen at that location.– Michael Petch
Dec 26 '18 at 18:26
You can't use
Int 33h
MS mouse interrupts in a bootloader because those interrupts aren't available until DOS is running and it has installed the MS Mouse driver. You will effectively have to write your own mouse code and update the cursor yourself. This would involve replacing the mouse interrupt with your own, reading the PS/2 port for data, building up a mouse packet and then processing the coordinates in the packet and then place a cursor on the screen at that location.– Michael Petch
Dec 26 '18 at 18:26
can you please guide me through the process, or recommend me some good source on this, as I am an absolute beginner in os and working to solve this issue from a while now.
– linxnerd
Dec 27 '18 at 4:12
can you please guide me through the process, or recommend me some good source on this, as I am an absolute beginner in os and working to solve this issue from a while now.
– linxnerd
Dec 27 '18 at 4:12
As a beginner this requires a fair amount of knowledge to pull off. Understanding interrupts; how to hook the interrupts in real mode; accessing the PS/2 controller and PS/2 device (assuming PS/2 style mouse);how to update the video display to fake a mouse cursor etc. OSDev Wiki has information on working with the mouse: wiki.osdev.org/Mouse_Input . More info on working with the PS/2 controller can be found here: wiki.osdev.org/%228042%22_PS/2_Controller
– Michael Petch
Dec 27 '18 at 4:21
As a beginner this requires a fair amount of knowledge to pull off. Understanding interrupts; how to hook the interrupts in real mode; accessing the PS/2 controller and PS/2 device (assuming PS/2 style mouse);how to update the video display to fake a mouse cursor etc. OSDev Wiki has information on working with the mouse: wiki.osdev.org/Mouse_Input . More info on working with the PS/2 controller can be found here: wiki.osdev.org/%228042%22_PS/2_Controller
– Michael Petch
Dec 27 '18 at 4:21
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53930033%2fhow-to-enable-show-mouse-cursor-on-bootloader-screen%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53930033%2fhow-to-enable-show-mouse-cursor-on-bootloader-screen%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You can't use
Int 33h
MS mouse interrupts in a bootloader because those interrupts aren't available until DOS is running and it has installed the MS Mouse driver. You will effectively have to write your own mouse code and update the cursor yourself. This would involve replacing the mouse interrupt with your own, reading the PS/2 port for data, building up a mouse packet and then processing the coordinates in the packet and then place a cursor on the screen at that location.– Michael Petch
Dec 26 '18 at 18:26
can you please guide me through the process, or recommend me some good source on this, as I am an absolute beginner in os and working to solve this issue from a while now.
– linxnerd
Dec 27 '18 at 4:12
As a beginner this requires a fair amount of knowledge to pull off. Understanding interrupts; how to hook the interrupts in real mode; accessing the PS/2 controller and PS/2 device (assuming PS/2 style mouse);how to update the video display to fake a mouse cursor etc. OSDev Wiki has information on working with the mouse: wiki.osdev.org/Mouse_Input . More info on working with the PS/2 controller can be found here: wiki.osdev.org/%228042%22_PS/2_Controller
– Michael Petch
Dec 27 '18 at 4:21