flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Timer ( INT8 ) Urgent Helpme Please!

Author
Thread Post new topic Reply to topic
diegocn



Joined: 17 Nov 2004
Posts: 7
diegocn 19 Nov 2004, 21:37
Im have problems with the timer and int 8. Im creating an multitask OS,
but the problem is the timer. See the code:

Code:
#make_BIN#

; Aonde o programa fica
#LOAD_SEGMENT=0800h#
#LOAD_OFFSET=0000#

; ========= Constantes =============
TIMER_IRQN        equ     (8)
INICIO           equ     (0)
TMR_CONTROL      EQU     43H
TMR_COUNTER0     EQU     40H
TMR_COUNTER1     EQU     41H
TMR_COUNTER2     EQU     42H


; ======= Programacao do PIT =========

CLI

mov     AL, 00110110b
out    TMR_CONTROL, AL
mov  CX, 0FFFFh
mov       AL, CL
out   TMR_COUNTER0, AL
mov AL, CH
out   TMR_COUNTER0, AL

mov     ax, int_timer
mov    [INICIO:TIMER_IRQN*4], ax
mov    ax, cs
mov   [INICIO:TIMER_IRQN*4+2], ax

STI

jmp $-2

; ==== Funcao Chamada pelo timer =====

int_timer:

inc        temp
mov     ah, 02h
mov  dh, 1
mov    dl, temp
mov bh, 00h
int  10h

mov  ah, 09h
mov  al, "A"
mov        bl, 01001111b
mov    cx, 01h
int  10h

jmp $-2

; ============ Variaveis =============
temp        db      0    


its an simple example than I need to function to create the
other routines, but this not function!!!!
What is the problem?!?!?!
Can sendme a simple source code for using the timer?

Very Thanks,
Diegocn
Post 19 Nov 2004, 21:37
View user's profile Send private message Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 20 Nov 2004, 23:32
Post 20 Nov 2004, 23:32
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:  


< 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.