Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

HXDOS extender and needed import procedures (Miscellaneous)

posted by CandyMan, 05.03.2021, 22:07

I also found bug in ConvertAStr that crashes with delphi compilers.

ConvertAStr proc public pBuffer:ptr
;       pushad
;       mov ecx, eax
;       mov ah,0
;       inc ecx                 ;copy the term 0 as well
;       mov edi, pBuffer
;       mov esi, edi
;       .while (ecx)
;               dec ecx
;               mov al,[esi+ecx]
;               mov [edi+ecx*2],ax
;       .endw
;       popad
;       ret
        pop     ebp
        pop     ecx
        pop     eax
        pushad
        mov     esi,eax
        mov     edi,eax
        xchg    ecx,eax
        jecxz   @Quit
@Loop:  lodsb
        or      al,al
        jnz     @Loop
        sub     esi,ecx
        mov     ecx,esi
        mov     ah,al
@Pool:  dec     ecx
        mov     al,[ecx+edi]
        mov     [edi+ecx*2],ax
        jnz     @Pool
@Quit:  popad
        jmp     ecx
        align 4
ConvertAStr endp

 

Complete thread:

Back to the forum
Board view  Mix view
22749 Postings in 2119 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum