delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/13/16:40:59

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200205132040.g4DKesR14434@speedy.ludd.luth.se>
Subject: zero_regs in stub/stub.asm
To: DJGPP-WORKERS <djgpp-workers AT delorie DOT com>
Date: Mon, 13 May 2002 22:40:53 +0200 (CEST)
X-Mailer: ELM [version 2.4ME+ PL78 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

We have:
;-----------------------------------------------------------------------------
;  DPMI utility functions

zero_regs:
        push    ax
        push    cx
        push    di
        xor     ax, ax
        mov     di, dpmi_regs
        mov     cx, 0x19
        rep
        stosw
        pop     di
        pop     cx
        pop     ax
        ret

...

dpmi_regs:
        .db     0x32 .dup 0
dr_edi = 0x00
dr_di  = 0x00
dr_esi = 0x04
dr_si  = 0x04
dr_ebp = 0x08
dr_bp  = 0x08
dr_ebx = 0x10
dr_bx  = 0x10
dr_bl  = 0x10
dr_bh  = 0x11
dr_edx = 0x14
dr_dx  = 0x14
dr_dl  = 0x14
dr_dh  = 0x15
dr_ecx = 0x18
dr_cx  = 0x18
dr_cl  = 0x18
dr_ch  = 0x19
dr_eax = 0x1c
dr_ax  = 0x1c
dr_al  = 0x1c
dr_ah  = 0x1d
dr_efl = 0x20
dr_es  = 0x22
dr_ds  = 0x24
dr_fs  = 0x26
dr_gs  = 0x28
dr_ip  = 0x2a
dr_cs  = 0x2c
dr_sp  = 0x2e
dr_ss  = 0x30


Why are we zeroing 0x19 words = 0x38 bytes while there's only room for
0x32 bytes?


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019