flat assembler
Message board for the users of flat assembler.

Index > OS Construction > []

Author
Thread Post new topic Reply to topic
mikegonta



Joined: 20 Nov 2005
Posts: 99
mikegonta
[ Post removed by author. ]


Last edited by mikegonta on 27 Jan 2009, 22:02; edited 3 times in total
Post 10 Oct 2007, 20:35
View user's profile Send private message Reply with quote
dasyar



Joined: 27 Feb 2005
Posts: 33
dasyar
I ran this program, and it did not run for me. What I get is a black on green 0d on the left side of the sreen just below your logo. The cursor is in about the middle of the screen, but the floppy keeps spinning, and no time is being displayed.

I stripped the program and just left che cursor move code in, the same thing occurs. What I expected at the very least, is the floppy to stop spinning. So, I am not sure what the problem is.
Post 10 Oct 2007, 23:18
View user's profile Send private message Reply with quote
dasyar



Joined: 27 Feb 2005
Posts: 33
dasyar
Mike,
Below is a small snippet, which seems to work. The problem is that when I try to use int 1Ah or int 16h, it seems to corrupt the program. There is also a problem with the keyboard int, that also seems to corrupt. The int 10h seems to behave like it's supposed too.

;MyClock.asm

use32
org 100000h

; mov eax, 86h*256
; mov edx, 3000000
; int 15h

;;;This starts the interrupt process
mov eax, 0ffh*256+50h
mov ebx, timer_hook
int 15h
mov [continue], eax

; mov ah, 02h
; int 1Ah
; mov al, ch
; shr al, 4
; add al, "0"
; mov [clock], al
; and ch, 0fh
; add ch, "0"
; mov ah, 2
; xor ebx, ebx
; mov edx, 12*256+36
; int 10h
; mov eax, 86h*256
; mov edx, 3000000
; int 15h
jmp exit

;;;This is a slave loop
timer_hook:

jmp timer_hook


show_time:

ret

;;;This necessary for a clean return
exit:
mov eax, 0ffh*256+50h
mov ebx, [continue]
int 15h
int 20h
retnd


continue: dd 0
second: dd 18
clock: db "00:00:00"
times 8 db 8
db 0
Post 11 Oct 2007, 22:40
View user's profile Send private message Reply with quote
mikegonta



Joined: 20 Nov 2005
Posts: 99
mikegonta
[ Post removed by author. ]


Last edited by mikegonta on 27 Jan 2009, 22:02; edited 3 times in total
Post 11 Oct 2007, 23:33
View user's profile Send private message Reply with quote
dasyar



Joined: 27 Feb 2005
Posts: 33
dasyar
I just tried out the new progs, and they work. I assume that int 20 is the same as doing a retnd, which is needed for a clean return of an app. So far your aeBIOS seems to be running smoothly, now on to some other testing.

I guess the next thing to consider is creating a bootable HD, at some point some people might want to work from an HD.

Thanks
Post 12 Oct 2007, 15:19
View user's profile Send private message Reply with quote
dasyar



Joined: 27 Feb 2005
Posts: 33
dasyar
I have some code below where I am trying to include a cli as a task. The problem with the code below is, the floppy keeps spinning. It seems when it tries to do the keyboard int 16, the program does not work the way I expect it to work. Now is there a problem with my programming technique, or is there a subtle problem with aeBIOS?

I would sure like to see some simple code that runs more than one task, maybe that would put me on the right track.

Thanks

;MyCli.asm

use32
org 100000h

call cls

mov eax, 0ffh*256+50h
mov ebx, continue
int 15h

slave:

jmp slave


timer_hook:
pusha
call main_thrd
; call oneT
popa
jmp DWORD [continue]
continue: dd timer_hook


oneT:
pusha
mov ah, 02h ;Get time via BIOS
int 1ah
mov al, ch
shr al, 4
add al, "0"
mov [clock], al
and ch, 0fh
add ch, "0"
mov [clock+1], ch
mov al, cl
shr al, 4
add al, "0"
mov [clock+3], al
and cl, 0fh
add cl, "0"
mov [clock+4], cl
mov al, dh
shr al, 4
add al, "0"
mov [clock+6], al
and dh, 0fh
add dh, "0"
mov [clock+7], dh


mov ah, 2 ;Move cursor to bottom
xor ebx, ebx
mov edx, 24*256+71
int 10h

.display:
mov esi, clock
mov ah, 0eh
mov bl, 0fh
@@:
mov al, [esi]
lea esi, [esi+1]
test al, al
je @F
int 10h
jmp @B
@@:
popa
ret

main_thrd:
pusha

.next_character:
xor eax, eax
int 16h
cmp al, 0dh
jne @F
call printc
mov al,0ah
call printc
jmp .exit
@@:
mov [edi], al
.print:
call printc
lea edi, [edi+1]
cmp edi, command_line+1023
jne .next_character
.exit:
mov BYTE [edi], 0
popa
ret

;;;;;;;;;;;;;;;;
prints:
pusha
@@:
mov al, [esi]
lea esi, [esi+1]
test al, al
je @F
call printc
jmp @B
@@:
popa
ret

;;;;;;;;;;;;;;;;;;
printc:
pusha
mov ah, 0eh
mov bl, 0fh
int 10h
popa
ret

cls:
pusha
mov ecx, 80/2
mov esi, logo
mov edi, 0b8000h
@@:
mov eax, [esi]
lea esi, [esi+4]
mov [edi], eax
lea edi, [edi+4]
dec ecx
jne @B
mov eax, 2*256
xor ebx, ebx
mov edx, 1*256
int 10h
popa
ret


clock: db "00:00:00"
times 8 db 8
db 0
logo: times 40 dd 0
prompt: db "A:\>", 0
command_line: rb 1024

exit:
mov eax, 0ffh*256+50h
mov ebx, continue
int 15h
jmp $
Post 15 Oct 2007, 22:58
View user's profile Send private message 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.