flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
grunge 22 Feb 2007, 23:38
Hi All
I have news tests.... but not success.... when I change for not load DOS int.... the program dead... looping forever!!! ![]() grunge |
|||
![]() |
|
rugxulo 22 Feb 2007, 23:40
moderator, please move this to the DOS subforum (unless I misunderstood the poster's intentions).
|
|||
![]() |
|
grunge 23 Feb 2007, 00:35
Hi rugxulo
No delete it... please!!! ![]() I have problem with change the code for "pure" code... one code that load and run the mouse without DOS... Thanks and sorry for my explanation of problem... |
|||
![]() |
|
grunge 23 Feb 2007, 01:39
Hi All
I happy... my mouse run without DOS... I have smalls bugs... but tomorrow I work for solution it... Bugs: Mouse run loop... (I not move the mouse... but the pixel run in screen (is one ghost bug ![]() Last edited by grunge on 10 Mar 2007, 21:34; edited 1 time in total |
|||
![]() |
|
rugxulo 23 Feb 2007, 20:37
grunge wrote: Hi rugxulo I thought you'd said without DOS, but here's what confused me: Quote:
Also, FYI, if you're writing 16-bit, 8086-compatible code, check out MCD's ONLY8086.INC include. P.S. You can "push ax bx cx dx" all on one line (but, unlike Octasm, you'll have to pop in reverse: "pop dx cx bx ax"). Also, don't forget that local labels exist: "good_hor[12] and good_ver[12]" -> "good: .hor1: .hor2: .ver1: .ver2:". (Not that it matters, but you may prefer a cleaner approach). |
|||
![]() |
|
grunge 24 Feb 2007, 02:07
Thanks for yours suggestions... the ps2 mouse runs in "pure mode"... but the source have few small (logical bug) problems... but I work for solution it... All help is Welcome!!!
Quote:
This block code is for my tests when I working in FreeDos. (for not have restart and boot the mouse program all time) grunge |
|||
![]() |
|
grunge 05 Mar 2007, 03:02
Hi All
I have changed the code for load mouse out DOS... but not success... this is source with run in DOS: Code: ORG 100h Jmp InstallMouse ; Load the mouse MainCode: ; Use the mouse loaded Mov AX,12h Int 10h MainLoop: ; My Main Loop, show pixel with mouse coordinates Call get_pos Mov AH,0Ch Mov CX,CX Mov DX,DX Mov AL,15 Int 10h Xor AX,AX Mov AH,11h Int 16h Jnz Exit Jmp MainLoop Exit: ; Exit code Mov AX,3h Int 10h Mov AX,0x4C00 Int 21h InstallMouse: ; Load mouse in DOS, create one int mov bl,0adh call keyboard_cmd call keyboard_read ; Pac 1 call keyboard_read ; Pac 2 call keyboard_read ; Pac 3 mov bl,0aeh call keyboard_cmd mov al,20h out 0a0h,al out 20h,al mov ax,0x2574 mov dx,mouse_code int 21h cli mov bl,0a8h call keyboard_cmd mov bl,20h call keyboard_cmd call keyboard_read or al,2 mov bl,60h push ax call keyboard_cmd pop ax call keyboard_write mov bl,0d4h call keyboard_cmd mov al,0f4h call keyboard_write Jmp MainCode ; Return to MainCode (mouse loaded, then: use mouse And this is my code changed for run out DOS (when I run it... not run correct) Code: ORG 100h Jmp InstallMouse ; Load the mouse MainCode: ; Use the mouse loaded Mov AX,12h Int 10h MainLoop: ; My Main Loop, show pixel with mouse coordinates Call mouse_code Call get_pos Mov AH,0Ch Mov CX,CX Mov DX,DX Mov AL,15 Int 10h Xor AX,AX Mov AH,11h Int 16h Jnz Exit Jmp MainLoop Exit: ; Exit code Mov AX,3h Int 10h Jmp $ InstallMouse: ; Load mouse in DOS, create one int mov bl,0adh call keyboard_cmd call keyboard_read ; Pac 1 call keyboard_read ; Pac 2 call keyboard_read ; Pac 3 mov bl,0aeh call keyboard_cmd mov al,20h out 0a0h,al out 20h,al ; mov ax,0x2574 ; mov dx,mouse_code ; int 21h cli mov bl,0a8h call keyboard_cmd mov bl,20h call keyboard_cmd call keyboard_read or al,2 mov bl,60h push ax call keyboard_cmd pop ax call keyboard_write mov bl,0d4h call keyboard_cmd mov al,0f4h call keyboard_write Jmp MainCode ; Return to MainCode (mouse loaded, then: use mouse All help for correct the bug is welcome... or reply for why the bug is occurred.... thanks for all... and sorry for my problem... but I have much time in it... and not find one solution... grunge |
|||
![]() |
|
DOS386 07 Mar 2007, 17:01
I had a look at your code (did not anlyze the port accesses in detail,
use my hints with care) and tested it. The no-OS version ends up in a hard freezer in text screen mode. ![]() Quote: This block code is for my tests when I working in FreeDos. (for not have restart and boot the mouse program all time) Quote: but here's what confused me: It's perfectly possible and useful to test no-OS code in FreeDOS ![]() Also INT $21,$4C00 is no problem ... you just have to explain it better ![]() Code: Jmp InstallMouse ; Load the mouse MainCode: ; Use the mouse loaded Mov AX,12h Int 10h You probably should swap them: 1. Set video mode 2. Activate mouse Code: Mov CX,CX Mov DX,DX What does this code do ? ![]() Code: mov ax,0x2574 mov dx,mouse_code int 21h This is the problem. This must be kicked in the no-OS version, as you found out ![]() ![]() unhandled IRQ occurs ![]() Code: cli Why do you ban interrupts ? Where do you re-allow them ? Seems to be part of the problem as well ![]() Quote:
This probably also contributes to the problem. After hacking on IRQ's and ports you maybe should no longer use BIOS INT's either ![]() _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
![]() |
|
grunge 10 Mar 2007, 21:37
Hi all
I correct the mouse driver... source1 (DOS) Code: mov ax,0x2574 mov dx,mouse_code int 21h NTOSKRNL_VXE Thanks for your help, your helps is correct! I have changed it for create one "Interrupt vector" without DOS, I only changed it... now... mouse runs correct in pure code!!! ![]() Thanks for all help... grunge |
|||
![]() |
|
Dex4u 11 Mar 2007, 19:44
There has been alot of people with mouse problem in the forum, so i have code a simple demo, of a working mouse driver, that does not use any OS code and is fully self contained.
Here is the fasm code and a bootable program to test it, (Note: it will run from dos, but not a dosbox under windows). http://www.dex4u.com/tuts/MouseDemo.zip I will add comment in the next day or two, but for now, the code is there. PS: The demo is running in MiniDos, if you want the code let me know. |
|||
![]() |
|
grunge 12 Mar 2007, 22:57
Hi Dex4u
Good idea... it help very developers... my mouse already runs correct... I use "Set Interrupt Vector" of "MiniDos" (I already the source)... ![]() grunge |
|||
![]() |
|
Dex4u 13 Mar 2007, 00:34
@grunge, Thanks for you kind words and good luck with your OS
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.