Click here to Skip to main content
15,920,603 members
Home / Discussions / Hardware & Devices
   

Hardware & Devices

 
GeneralRe: BIOS drivers... Pin
Alexander M.,18-Jun-05 2:08
Alexander M.,18-Jun-05 2:08 
GeneralRe: BIOS drivers... Pin
Niklas Ulvinge18-Jun-05 6:41
Niklas Ulvinge18-Jun-05 6:41 
GeneralRe: BIOS drivers... Pin
toxcct20-Jun-05 5:37
toxcct20-Jun-05 5:37 
GeneralRe: BIOS drivers... Pin
Niklas Ulvinge20-Jun-05 7:46
Niklas Ulvinge20-Jun-05 7:46 
GeneralRe: BIOS drivers... Pin
toxcct20-Jun-05 20:42
toxcct20-Jun-05 20:42 
GeneralRe: BIOS drivers... Pin
Alexander M.,20-Jun-05 9:29
Alexander M.,20-Jun-05 9:29 
GeneralRe: BIOS drivers... Pin
Niklas Ulvinge20-Jun-05 23:41
Niklas Ulvinge20-Jun-05 23:41 
GeneralRe: BIOS drivers... Pin
Niklas Ulvinge17-Jul-05 21:26
Niklas Ulvinge17-Jul-05 21:26 
I want to do a driver that acts like this:
Note: the code isn't optimized nor finnished.
[code]
;
;The binary keyboard driver version 2.1
;
;For now it's only a simple program that looks like a driver.
;
;I'll make it a driver when I know how...
;
;

format mz
org 100h

start:
call PrintInfo

mov al, 06 ;makes the input buffer not to be full
mov ah, 0Ch
mov dl, 0FFh
int 21h

xor ax, ax
IN al, 60h ;get input from keyboard

;nop ;something, dont have to be there.

cmp ax, cx ;loop until input change
mov cx, ax
je start

;
;checking all chars
;
;beginning with makecodes
;
cmp cx, 1EH
je makea

cmp cx, 1FH
je makes

cmp cx, 20H
je maked

cmp cx, 21H
je makef

cmp cx, 24H
je makej

cmp cx, 25H
je makek

cmp cx, 26H
je makel

cmp cx, 27H
je makeo

cmp cx, 39H
je makespace

cmp cx, 1
je exit
;
;the brake codes
;

cmp cx, 9EH
je brakea

cmp cx, 9FH
je brakes

cmp cx, 0A0H
je braked

cmp cx, 0A1H
je brakef

cmp cx, 0A4H
je brakej

cmp cx, 0A5H
je brakek

cmp cx, 0A6H
je brakel

cmp cx, 0A7H
je brakeo


;
;make codes for each input key
; make brake
; dec hex hex
;a = 30 1E 9E
;s = 31 1F 9F
;d = 32 20 A0
;f = 33 21 A1
;j = 36 24 A4
;k = 37 25 A5
;l = 38 26 A6
;ö = 39 27 A7
; = 57 39 B9
;(space)
;
;brake codes are make code + 128
;


endOfChecking:

jmp start

exit:
mov ah, 4Ch
int 21h




;
;actions of the make and brake codes
;
makea:
or bx, 10000000b
jmp endOfChecking
makes:
or bx, 01000000b
jmp endOfChecking
maked:
or bx, 00100000b
jmp endOfChecking
makef:
or bx, 00010000b
jmp endOfChecking
makej:
or bx, 00001000b
jmp endOfChecking
makek:
or bx, 00000100b
jmp endOfChecking
makel:
or bx, 00000010b
jmp endOfChecking
makeo:
or bx, 00000001b
jmp endOfChecking

brakea:
and bx, 01111111b
jmp endOfChecking
brakes:
and bx, 10111111b
jmp endOfChecking
braked:
and bx, 11011111b
jmp endOfChecking
brakef:
and bx, 11101111b
jmp endOfChecking
brakej:
and bx, 11110111b
jmp endOfChecking
brakek:
and bx, 11111011b
jmp endOfChecking
brakel:
and bx, 11111101b
jmp endOfChecking
brakeo:
and bx, 11111110b
jmp endOfChecking

makespace:
and bx, 11111111b
jmp endOfChecking

char: db ?


PrintNumInCl:
;convert ax to number and print
push ax
push dx

xor ax, ax
mov al, cl ;2 char
mov dh, 100 ;1 char skipping this for now
div dh

add al, 30h
MOV dl, al ;print char
MOV ah, 02h
INT 21h

xor ax, ax
mov al, cl ;2 char
mov dh, 100
div dh
mov al,ah
xor ah,ah
mov dh,10
div dh

add al, 30h
MOV dl, al ;print char
MOV ah, 02h
INT 21h

xor ax, ax
mov al, cl ;last char
mov dh, 10
div dh

add ah, 30h
MOV dl, ah ;print char
MOV ah, 02h
INT 21h

pop dx
pop ax

ret

PrintInfo:
push ax
push dx
push cx

mov ah,03h ;Read Cursor Position and Size
xor bh,bh ;on page
int 10h ;rets CH Cursor start line
push dx ; CL Cursor end line
; DH Row
; DL Column
;
; check all states
;
xor dx,dx ;set cursor position
mov ah,02h
xor bh,bh
int 10h

mov cl,10000000b
mov ch,8
PrintInfoLoop:
mov ax,bx
and al,cl
dec ch
shr cl,1

cmp al,0
je PrintSpace

MOV dl, [InputChars + ch] ;print char
MOV ah, 02h
INT 21h

PrintInfoLoopReturn:

cmp ch,0
jne PrintInfoLoop


pop dx ;set cursor position
mov ah,02h
xor bh,bh
int 10h

pop cx
pop dx
pop ax

ret

PrintSpace:
MOV dl, 20h ;print char
MOV ah, 02h
INT 21h
jmp PrintInfoLoopReturn


InputChars: db "ALKJFDSÖ"
[/code]

Niklas Ulvinge aka IDK
GeneralRe: BIOS drivers... Pin
Roger Wright20-Jun-05 21:16
professionalRoger Wright20-Jun-05 21:16 
GeneralRe: BIOS drivers... Pin
Niklas Ulvinge22-Jun-05 8:26
Niklas Ulvinge22-Jun-05 8:26 
GeneralRe: BIOS drivers... Pin
Roger Wright22-Jun-05 15:56
professionalRoger Wright22-Jun-05 15:56 
GeneralRe: BIOS drivers... Pin
Niklas Ulvinge23-Jun-05 0:08
Niklas Ulvinge23-Jun-05 0:08 
QuestionHow can run my application with click on my own file Pin
Anonymous17-Jun-05 1:16
Anonymous17-Jun-05 1:16 
AnswerRe: How can run my application with click on my own file Pin
toxcct17-Jun-05 1:43
toxcct17-Jun-05 1:43 
GeneralRe: How can run my application with click on my own file Pin
Maximilien17-Jun-05 3:47
Maximilien17-Jun-05 3:47 
AnswerRe: How can run my application with click on my own file Pin
MoustafaS17-Jun-05 2:27
MoustafaS17-Jun-05 2:27 
GeneralConnecting Guitar to Computer Pin
Mitch F.14-Jun-05 9:24
Mitch F.14-Jun-05 9:24 
GeneralRe: Connecting Guitar to Computer Pin
toxcct14-Jun-05 20:48
toxcct14-Jun-05 20:48 
GeneralRe: Connecting Guitar to Computer Pin
Carl Mercier15-Jun-05 9:40
Carl Mercier15-Jun-05 9:40 
GeneralRe: Connecting Guitar to Computer Pin
Mitch F.15-Jun-05 10:54
Mitch F.15-Jun-05 10:54 
GeneralRe: Connecting Guitar to Computer Pin
Carl Mercier15-Jun-05 15:30
Carl Mercier15-Jun-05 15:30 
GeneralRe: Connecting Guitar to Computer Pin
Mitch F.15-Jun-05 19:50
Mitch F.15-Jun-05 19:50 
GeneralRe: Connecting Guitar to Computer Pin
Carl Mercier17-Jun-05 2:43
Carl Mercier17-Jun-05 2:43 
GeneralRe: Connecting Guitar to Computer Pin
Christian Graus15-Jun-05 16:22
protectorChristian Graus15-Jun-05 16:22 
GeneralRe: Connecting Guitar to Computer Pin
Mitch F.15-Jun-05 19:54
Mitch F.15-Jun-05 19:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.