flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Keyboard Interrupt Problem

Goto page Previous  1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
i didn't code IRQ0, first the keyboard, IRQ1.
support of extended keys
extended keys are remapped from 70h to 7fh
so now, can have a full control of keys status.

like you load this file, like you respect the UFO*NOSS* licence

*Use FOr NOnSteal Style*

the licence agreements are these:
UFO NOSS is a licence that says you are the autor of the ASM code.
ASM code is hard to steal if possessing the UFO NOSS licence.
This licence is applied to open source code writen in ASM.
This licence name must be UFO NOSS because it's funny....! Exclamation
This licence is free to use, just need to contain autor name in copies.
This licence will be good if respected, if a function makes problem, the autor can be informed and he/sha can update the function... Smile
This licence name shall be in source. UFO NOSS; just for fun and easy rely
This licence is boring.
agreements list is subject to modifications. only to increase the autor protection AND the user freedom.


Last edited by edfed on 11 Dec 2007, 09:55; edited 3 times in total
Post 11 Dec 2007, 04:17
View user's profile Send private message Visit poster's website Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
I was not sure and just want to point it out for anyone programming them that it could cause problems if its over looked!
Post 11 Dec 2007, 04:22
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 713
Location: Adelaide
sinsi
The only thing I have a problem with is the LED's - anyone have an idea?
They only work sometimes, I think the problem is delaying while waiting for the ACKs.

If you think of a binary value for the IRQ mask, it makes more sense
Code:
 mov al,0xFE
 out 0x21,al
;or this
 mov al,11111110b
 out 0x21,al
    

Bits 0-7 of port 21 are irq 0-7, bits 0-7 of port A1 are irq 8-15.
Setting a bit will disable the irq. Think of 21/A1 as the irq disable registers.
Post 11 Dec 2007, 04:49
View user's profile Send private message Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
Code:
set_keyboard_LEDs: 
; bl = keyboard LEDs status 
        mov     ah,0ADh 
        call    write_8042 
        mov     ah,0EDh 
        call    write_keyboard 
        mov     ah,bl 
        and     ah,111b 
        call    write_keyboard 
        mov     ah,0AEh 
        call    write_8042 
        ret 
      write_8042: 
        in      al,64h 
        test    al,10b 
        jnz     write_8042 
        mov     al,ah 
        out     64h,al 
        ret 
      write_keyboard: 
        mov     al,ah 
        out     60h,al 
        in      al,60h 
        cmp     al,0FAh 
        jne     write_keyboard 
        ret
    

this should get you started!
Post 11 Dec 2007, 04:56
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
updated int9 for real mode above ^

now it support extended keys.
and have more comments for beginners.

UFO NOSS
Post 11 Dec 2007, 10:00
View user's profile Send private message Visit poster's website Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias
edfed wrote:
...UFO NOSS...
I was unfamiliar with these acronyms, and discovered, just now, after reading your post above, what these acronyms mean. I would suggest that you may wish to consider submitting them to acronymfinder.com, if you intend to use them on the forum.
Confused
Post 11 Dec 2007, 18:05
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
UFO NOSS is now a reconized acronym

Use FOr NOn Steal Style
Wink
Post 11 Dec 2007, 20:37
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
keyboard INT9 problems:

some keys have a shift status on desktop PC

i don't know how to fix this shift status
it makes appear the shift key when extended keyx are pressed.

as i don't use a big keyboard buffer, i don't see actually how can i fix this problem.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
optional shift: fixed

now, the problem is, some key bytes break code aren't send when too much keys are pressed.
need a fix too...
Post 11 Dec 2007, 21:14
View user's profile Send private message Visit poster's website Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias
edfed wrote:
UFO NOSS is now a reconized acronym
Use FOr NOn Steal Style
Umm, ok, well, good. Not bad. Ahh, however, umm, how can I write this: there are certain conventions regarding acronyms, and one of the conventions, not an absolute requirement to be sure, but a generally accepted practice, is to employ the FIRST letter of each word, or, alternatively, to use the first TWO letters of each word, but NOT to use Two letters for some words, and One letter for other words.....This is a kind of programming mentality, isn't it? In other words, acronyms are a type of CODE, and we are trying to figure out the code, right? So, you are making it quite difficult for us to deduce your meaning here. Further, UFO has a very well defined meaning in English: Unidentified Flying Objects, i.e. spacecraft from other planets. Admittedly, this is fantasy, science fiction, and so on, and not serious, like "non steal style", but, the fact remains that 99.99% of the world's native speakers of English, when asked the meaning of UFO, would respond with "unidentified flying object". In other words, edfed, you are sailing upwind here. Now, I don't know exactly what you mean by "Non-Steal style", because this expression, written out, has no meaning in English. I guess you are trying to indicate a committment to forego theft of other's ideas. If so, then, this is an admirable trait. Good. I like it. However, I would not use those English words to describe this character attribute. Mais, je vous assure, cher edfed, que je suis certain, que ce soit impossible pour moi de faire la meme chose dans une langue etranger. Vous est courageoux!!! Bravo, edfed.
Post 11 Dec 2007, 22:13
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
ouah, les fautes de fran├žais, impressionant.
therefore, i only invented this acronym for fun
UFO NOSS is fun no?
remind the alien and the fast and furious NOS
UFO like alien
NOS like boost asm
i cannot use the UN acronym cause it's the united nation
hemmmm
why not UN, UN in frensh means 1
1=un

regarding to acronyms standard, i don't care about because it's not the name that is important.
i launch a thread, find a FASM related, and generally an ASM licence.
in the terms of my UFO NOSS

note that i don't want to change this acronym, UFO NOSS is a fun name.
i love fun
FUN vs BABYLON <-- you see what i mean there?

war ina babylon
peace in funland
Post 11 Dec 2007, 22:29
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
update of my int9 for real mode.

now, it supports the extended key, ignore alternate shift.

next step is to manage the leds and make some int services.

keyboard service are:
ctrl break
pause
prtscr
numlock
shiftlock
ctrl alt del
scroll lock
fn key, for notebook

and the ps/2 mouse
what a big problem to make this fu***n os.


Description: an exemple + a bootable version of the same code
to boot, just copy the bkbint.bin onto a boot record
use 4 sectors, one for the loader and 3 for the rest...

Download
Filename: int9.zip
Filesize: 11.4 KB
Downloaded: 136 Time(s)

Post 12 Dec 2007, 03:38
View user's profile Send private message Visit poster's website Reply with quote
Hayden



Joined: 06 Oct 2005
Posts: 132
Hayden
if you play with the leds you will need to syncronize with the BIOS NumLock, CapsLock and ScrollLock status bytes too. else your leds may go out of sync with the actual on/off status. I have seen interrupt handlers (keyb) that will try to sync w/ these bytes too.

_________________
New User.. Hayden McKay.
Post 12 Dec 2007, 13:01
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
bios status are usefull only if you need a compatibility with bios

my int is not compatible with normal keyboard programming
so the numlock, shiftlock, scrolllock leds and status will be in an other place.
in the keytable for exemple.
i don't want to use any bios function.

remake all the computer system with a completelly different basis.

i'll only use 2 BIOS interrupts, and only at startup.
int 13h for bootloading
int 10h to switch in mode 13h
these are the only BIOS int i use.
Post 12 Dec 2007, 13:26
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
one more feature for this int, the key.none.
Code:
;key is the address of the keyboard field
;key.map is the offset of the key map in the keyboard field
;the keyboard field is set by int9 and is in ram.
mov al,[key+key.map]
or al,al
je nokeypressed
keypressed:
...
nokeypressed:
...
    
Post 13 Dec 2007, 01:32
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
sinsi:
Code:
        mov   al,0xED
        out   60h,al
        @@:
        in    al,64h
        test  al,10b
        jne   @b
        mov   al, 7
        and   al,111b
        out   60h,al
    
Post 13 Dec 2007, 02:28
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
everybody:
Code:
         org 100h
         mov ah,4
debut:
         mov al,0edh
         out 60h,al
@@:
         in al,64h
         and al,2
         jne @b
         mov al,ah
         out 60h,al
         shr ah,1
         jne @f
         mov ah,4
@@:
         mov ecx,39999999
@@:
         dec ecx
         jne @b
         in al,60h
         cmp al,1
         jne debut
         ret           
    
Post 14 Dec 2007, 04:43
View user's profile Send private message Visit poster's website Reply with quote
Hayden



Joined: 06 Oct 2005
Posts: 132
Hayden
edfed wrote:
bios status are usefull only if you need a compatibility with bios

my int is not compatible with normal keyboard programming
so the numlock, shiftlock, scrolllock leds and status will be in an other place.
in the keytable for exemple.
i don't want to use any bios function.

remake all the computer system with a completelly different basis.

i'll only use 2 BIOS interrupts, and only at startup.
int 13h for bootloading
int 10h to switch in mode 13h
these are the only BIOS int i use.


correct, but BIOS still installs a keyboard handler way before control is passed to any boot sector

_________________
New User.. Hayden McKay.
Post 15 Dec 2007, 14:22
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
yep, but nowadays, computers are corrupted by bad oses, limited to c language compatibility.
Post 15 Dec 2007, 14:45
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Quote:
yep, but nowadays, computers are corrupted by bad oses, limited to c language compatibility.

why don't you use some better OS then?

And what exactly would you make better in Windows, for example? Or, in Linux?
Post 15 Dec 2007, 18:11
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4242
Location: 2018
edfed
what i want on a pc:

what i want for a pc, it is an audio sequencer at startup, a video game emulator at startup, a 3d builder at startup, a complete graphic game audio video with many links into the softwares, for exemple, use the function play mp3 from audio player into the sequencer.

a complete asm ide into a easy import and call system.
functions from other software become shared, or not, as you want.
use the hexeditor objet from text pad into the graphic or 3d maker.
replacing a current function or kernel portion, see the internet connexion as asm
self modifiing source code and some starnge things...
all things that are not easy to do with current software

make netwoork data capture, isolate or ban some objects on web pages by a click, see and explore the hard disk like a real plate composed array 3D, poah, many many things
Post 16 Dec 2007, 02:07
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.