Alex_

That's so pathetic and sad that such a potential person went down on prostitution just for money/pleasure. I feel sorry/sad for her!

She has lost almost any sight of virtue. I hope she'll regret it because it is a bad thing. (and to all who say it's nothing wrong: you're sick and blind of the sin you carry with you!).

Why the history is getting darker? Because people like staying in the dark, not seeing their sins... they don't want to be enlightened, they don't want to see their filthiness!

Alex_ Junior Poster

Hello.
I have an assignment to make a procedure that will end a task. The manual from the university isn't quite clear about how this works. So mainly i have this problem: How does a procedure end a working task?
1) Does the bios call the procedure ? or,
2) Will my current operating system call my procedure? or,
3) I must make myself an os that boots, launches a task, and then after an amount of time calls the procedure to end the task and bail out.
I have no idea!
The manual does give some sort of code(which should be changed by me to work properly) that shows how it should look like. But once i don't understand the way it works, how can i know what to change?
The code with comments (translated by me) from the manual:
[code=asm]
PROC newint20h ; int 20h
call _di

;keeping back any interruptions so that the task may not be launched when the processor is taken away (me: what does "taken away" mean????)
pop ax
pop ax ;Extracting from stiva (me: I don't know the true translation of stiva. But one thing for sure: it's a FILO type memory acces)
pop ax

;extracting the leftovers that are left from the execution of int 20h (we don't need the CS,IP indicators any more) (me: What int 20h? Are they talking about THIS procedure or the system's one.)
push cs
pop ds
lea di,[cs:firsttask] ; DI = Offset of TASK
mov al,[cs:numtask] ...

Alex_ Junior Poster

Hey guys.
I want to read from a file created by me from a specific position. But i don't know how to move the file cursor.
[code=ptasm]
TITLE ep1

                .MODEL    SMALL
                .STACK    10h
                .DATA
      text       DB '1234567Start:7890.end',13,10
text_length equ $-text
dir     db  'D:\myfile.dat',00h
    buff        db  17 dup('$')
f_handle    dw  1 dup(?)

               .CODE
      begin:   mov  ax,@DATA
               mov  ds,ax
    ;Create file
            mov ax,3c00h
    mov dx,OFFSET dir
    mov     cx,20h
    int 21h
    mov [f_handle],ax
    ;Open file
    mov     ah,3dh
    mov     al, 2
    mov dx,OFFSET dir
    int 21h
    ;Write file
    mov     ax,4000h
    mov     bx,[f_handle]
    mov     cx,text_length
    mov     dx,OFFSET text
    int 21h
    ;Read file
    mov ax,3f00h
    mov     bx,[f_handle]
    mov     cx,17
    mov     dx,offset buff
    int 21h

            mov       ax,4c00h  
            int       21h   
            END       begin

[/code]
I want the cursor to be on the 8'th position, i.e.
Can anyone tell me how can i move it?