[Freedos-kernel] patch: floppy.asm
Hi! - prototypes fixed and syncronized with dsk.c. - more and better comments. - bugfix: when fl_lba_ReadWrite() converted to ASMPASCAL (and `ret' replaced by `ret 8'), "ret_AH" was remained as label for this tail (whereas other functions use plain `ret'); now ret_AH moved into another function. --- Begin Message --- diff -ruNp old/drivers/floppy.asm new/drivers/floppy.asm --- old/drivers/floppy.asm 2004-04-09 06:11:44.0 + +++ new/drivers/floppy.asm 2004-06-07 20:31:24.0 + @@ -28,15 +28,14 @@ ; $Id: floppy.asm,v 1.18 2004/04/09 13:11:22 bartoldeman Exp $ ; - %include "../kernel/segs.inc" - segment HMA_TEXT -; -; -; Reset both the diskette and hard disk system +%include "../kernel/segs.inc" +segment HMA_TEXT + ; -; BOOL fl_reset(WORD drive) +; int ASMPASCAL fl_reset(WORD drive); ; -; returns TRUE if successful +; Reset both the diskette and hard disk system. +; returns TRUE if successful. ; global FL_RESET @@ -44,199 +43,174 @@ FL_RESET: pop ax ; return address pop dx ; drive pushax ; restore address -mov ah,0; BIOS reset diskette & fixed disk + mov ah,0; reset disk int 13h + sbb ax,ax ; CF=1: error + inc ax ; return TRUE (1) on success, + ret ; FALSE (0) on error -sbbax,ax ; cy==1 is error - inc ax ; TRUE on success, FALSE on failure -ret - - -; ; -; Read disk change line status +; int ASMPASCAL fl_diskchanged(WORD drive); ; -; COUNT fl_diskchanged(WORD drive) -; -; returns 1 if disk has changed, 0 if not, 0x if error +; Read disk change line status. +; returns 1 if disk has changed, 0 if not, 0xFF if error. ; global FL_DISKCHANGED FL_DISKCHANGED: pop ax ; return address - pop dx ; get the drive number + pop dx ; drive pushax ; restore stack - pushsi ; restore stack -mov ah,16h ; read change status type + pushsi + mov ah,16h ; read change status type xor si,si ; RBIL: avoid crash on AT&T 6300 int 13h - - mov al,1 -jncfl_dc_ret1 ; cy==1 is error or disk has changed - - cmp ah,6; ah=6: disk has changed - je fl_dc_ret - dec ax ; 0xFF on error - -fl_dc_ret1:dec ax -fl_dc_ret: cbw popsi -ret + sbb al,al +jncfl_dc_ret ; CF=0: disk has not changed + cmp ah,6 + jne fl_dc_ret ; 0xFF on error + mov al,1; ah=6: disk has changed +fl_dc_ret: + jmp short ret_AH_0 + +; +; int ASMPASCAL fl_read (WORD drive, WORD head, WORD track, WORD sector, WORD count, void FAR *buffer); +; int ASMPASCAL fl_write (WORD drive, WORD head, WORD track, WORD sector, WORD count, void FAR *buffer); +; int ASMPASCAL fl_verify(WORD drive, WORD head, WORD track, WORD sector, WORD count, void FAR *buffer); +; int ASMPASCAL fl_format(WORD drive, WORD head, WORD track, WORD sector, WORD count, void FAR *buffer); ; -; Format Sectors -; -; COUNT fl_format(WORD drive, WORD head, WORD track, WORD sector, WORD count, BYTE FAR *buffer); -; -; Formats one or more tracks, sector should be 0. -; -; Returns 0 if successful, error code otherwise. + +; Format tracks (sector should be 0). + global FL_FORMAT FL_FORMAT: -mov ah, 5 -jmp short fl_common -; -; Read Sectors -; -; COUNT fl_read(WORD drive, WORD head, WORD track, WORD sector, WORD count, BYTE FAR *buffer); -; -; Reads one or more sectors. -; -; Returns 0 if successful, error code otherwise. -; -; -; Write Sectors -; -; COUNT fl_write(WORD drive, WORD head, WORD track, WORD sector, WORD count, BYTE FAR *buffer); -; -; Writes one or more sectors. -; -; Returns 0 if successful, error code otherwise. -; - global FL_READ -FL_READ: -mov ah,2; cmd READ -jmp short fl_common - + mov ah,5; format track + jmp short fl_common + global FL_VERIFY FL_VERIFY: -mov ah,4; cmd verify -jmp short fl_common - + mov ah,4; verify sector(s) + jmp short fl_common + +
[Freedos-kernel] bug?
Hi! In main.c:init_device() driver counted as system console if its attribute word contains only ATTR_CONIN bit. Isn't there should be both ATTR_CONIN and ATTR_CONOUT bits set? Also, what prevents for one device be both system console and clock driver? Also, ATTR_CONIN bit checked without ATTR_CHAR - isn't it should be checked? So, I suggest, instead: __O\_/_\_/O__ if (!(dhp->dh_attr & ATTR_CHAR) && (rq.r_nunits != 0)) { dhp->dh_name[0] = rq.r_nunits; update_dcb(dhp); } if (dhp->dh_attr & ATTR_CONIN) LoL->syscon = dhp; else if (dhp->dh_attr & ATTR_CLOCK) LoL->clock = dhp; _ O/~\ /~\O should be: __O\_/_\_/O__ if (dhp->dh_attr & ATTR_CHAR) { if (dhp->dh_attr & (ATTR_CONIN | ATTR_CONOUT)) LoL->syscon = dhp; if (dhp->dh_attr & ATTR_CLOCK) LoL->clock = dhp; } else if (rq.r_nunits) { dhp->dh_name[0] = rq.r_nunits; update_dcb(dhp); } _ O/~\ /~\O --- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] bug: floppy.asm
Hi! 7-Июн-2004 19:32 [EMAIL PROTECTED] (tom ehlert) wrote to "Arkady V.Belousov" <[EMAIL PROTECTED]>: >> I found another bug: >> - when fl_lba_ReadWrite() converted to ASMPASCAL (and `ret' replaced by `ret >> 8'), "ret_AH" remains as label for this tail (whereas other functions use >> plain `ret'). te> then remove the label, compile, and see what happens :(( Of course, it (NASM) should complain (because this is used label). Solution is easy: duplicate epilog code, but with plain `ret'. I already made this fix, now wait when Keneth will be ready to start update the CVS. --- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] bug: floppy.asm
Hello Arkady, > I found another bug: > - when fl_lba_ReadWrite() converted to ASMPASCAL (and `ret' replaced by `ret > 8'), "ret_AH" remains as label for this tail (whereas other functions use > plain `ret'). then remove the label, compile, and see what happens :(( tom --- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] Re: LBACache test results
I only used Interlink on FAT16 drives for the tests. True, InterLink does not support FAT32 because FAT32 didn't exist when InterLink was made. However, on normal MS-DOS, if you run InterLink/InterServer on a FAT32 drive, it won't crash or suffer data loss, it simply reports the drive as 268 MB (doesn't matter what size it really is), and the drive will be inaccessible on the other computer. > > If I recall correctly, Interlnk never had FAT32 support, so I hope C: isn't FAT32. > as alternative to FD(X)XMS, we now use HIMEM.EXE , included in the EMM386 package. > > ftp://ftp.devoresoftware.com/downloads/himem64.zip [22-04-2004] > > is probably most recent. > > Bernd > > > --- > This SF.Net email is sponsored by the new InstallShield X. > From Windows to Linux, servers to mobile, InstallShield X is the one > installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > ___ > Freedos-kernel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/freedos-kernel > --- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
[Freedos-kernel] bug: floppy.asm
Hi! I found another bug: - when fl_lba_ReadWrite() converted to ASMPASCAL (and `ret' replaced by `ret 8'), "ret_AH" remains as label for this tail (whereas other functions use plain `ret'). --- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
[Freedos-kernel] A pagina Negra do Cristianismo
Title: A PÁGINA NEGRA DO CRISTIANISMO - A PÁGINA NEGRA DO CRISTIANISMO - 2000 ANOS DE CRIMES, TERROR E REPRESSÃO Enrico Riboni "Acreditar num deus cruel, faz um homem cruel." Thomas Paine Prefácio Há cerca de 2000 anos, nascia na Galiléia um fundador de seita, que acabaria crucificado uns trinta anos mais tarde. Algumas de suas últimas palavras na cruz foram "Dêem-me de beber". E só. A seita que ele tinha fundado tornar-se-ia, com o passar dos anos, a maior de todos os tempos. Ela tomará o poder político dentro do Império Romano, abolirá a liberdade de religião, depois ajuntará montanhas de cadáveres: os seus membros massacrarão milhões de "infiéis", "hereges", "feiticeiras" e outros, depois se matarão entre eles próprios, levando a Europa às guerras mais ferozes que ela conheceu. Um passado destes poderia incitar à modéstia, mas os cristãos reivindicam, pelo contrário, o monopólio da ética. Proclamam que adoram o Deus único, que deus é "amor", e se consideram melhores que o resto da humanidade. Única ideologia capaz de dividir com o comunismo e o nazismo o pódio dedicado às ideologias mais mortíferas da história humana, o cristianismo mantém-se uma ideologia dominante em muitos países ocidentais, como o "gendarme do mundo", os EUA. Chegou a hora de abrir o "Livro Negro do Cristianismo: 2000 anos de terror, perseguições e repressão", que resume algumas das piores atrocidades cometidas em nome dessa ideologia que pretende promover o amor ao próximo. Ano um "Os deuses não estavam mais, e Deus não estava ainda." O Império Romano garantia a liberdade de culto. O ateísmo e a razão dominavam. É nessa época que nasce um sujeito que, segundo dizem certos judeus, perdeu o juízo porque leu o Tora demasiadamente jovem. Ele funda uma seita que visa proibir o culto dos outros deuses, exceto o seu. O sujeito é finalmente morto, mas a seita se expande com o êxito que se conhece. O culto da personalidade do fundador da seita atinge, nos cristãos, um nível que mesmo o estalinismo não conseguirá igualar: o fundador é proclamado "verdadeiro homem e verdadeiro Deus", ("Deus-Homem", em linguagem comum). Os que duvidam disso são proclamados imediatamente hereges, e sofrerão mais tarde os raios da Inquisição. A partir do século IV da nossa era, começará o assassinato dos não-crentes pelos cristãos. Leia o restante deste artigo em. http://www.mpsnet.net/virtualshop/vshoppolemicas.html Item 37 --- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] Re: LBACache test results
The Somertons schreef: Justin If I recall correctly, Interlnk never had FAT32 support, so I hope C: isn't FAT32. as alternative to FD(X)XMS, we now use HIMEM.EXE , included in the EMM386 package. ftp://ftp.devoresoftware.com/downloads/himem64.zip [22-04-2004] is probably most recent. Bernd --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel