Hi!
20-Ноя-2005 13:50 [EMAIL PROTECTED] (Kenneth J. Davis) wrote to
[email protected]:
>>>int13iret:
>>> inc sp ; clean up stack
>>> inc sp
>>> sti ; ensure int's are renabled
>>> retf 2 ; return to caller leaving flags asis
>> I don't think that this is right way, because caller may disable
>> interrupts for own purposes, whereas here interrupts enabled.
KJD> I'm not sure what is correct here,
I suggest, only returned ZF/CF should be copied to existing value on
stack. For example:
int13iret:
push ax
lahf
push bp
mov bp,sp
and byte [bp+10],not 0C1h ; 10=bp+ax+...+cs:ip
and ah,0C1h ; remain only SF/ZF/CF flags
or byte [bp+10],ah ; pass to caller SF/ZF/CF from INT13
pop bp
pop ax
add sp,2
iret
KJD> but I suppose it should simply leave
KJD> the flag as the user had it (I think I added this after reading a note
KJD> somewhere in RBIL about a bug in earlier BIOSes that failed to do this).
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Freedos-kernel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel