Skip to content

Commit

Permalink
causeway: update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalak committed Feb 1, 2025
1 parent d87c145 commit 0729fd5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
4 changes: 2 additions & 2 deletions bld/causeway/asm/int21h.asm
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ Int21h proc near
mov ebp,esp ;Make registers addressable.
mov esi,Int_Flags32
test BYTE PTR cs:Int21hSystemFlags,1 ;/
jz int211_32Bit0 ;/
movzx ebp,bp ;/
jz int211_32Bit0 ;/
movzx ebp,bp ;/
mov esi,Int_Flags16
int211_32Bit0:
add esi,ebp
Expand Down
27 changes: 18 additions & 9 deletions bld/causeway/asm/memory.asm
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,8 @@ mem4_0: cmp edx,LinearBase
jc mem4_1
cmp edx,LinearLimit
jnc mem4_2
and DWORD PTR es:[esi+ebx*4],NOT (PAGE_DIRTY or PAGE_ON_DISK) ;clear dirty & disk bits.
;clear dirty & on disk bits.
and DWORD PTR es:[esi+ebx*4],NOT (PAGE_DIRTY or PAGE_ON_DISK)
mem4_1: add edx,4096
inc ebx
dec ecx
Expand Down Expand Up @@ -1405,7 +1406,7 @@ ExtendLinearMemory proc near
jnc mem10_error

;
;Try extending useing physical memory first.
;Try extending using physical memory first.
;
mem10_f0:
mov eax,LinearLimit ;get new entry number.
Expand Down Expand Up @@ -1780,8 +1781,9 @@ mem11_AddPage:
mov eax,LinearEntry ;get the entry number again.
mov esi,1024*4096*1023 ;base of page alias's.
mov ebx,DWORD PTR es:[esi+eax*4] ;get current details.
and ebx,PAGE_ON_DISK ;pass living on disk bit.
or edx,ebx ;/
;retain on disk bit.
and ebx,PAGE_ON_DISK
or edx,ebx
mov DWORD PTR es:[esi+eax*4],edx ;set physical address.
;
cmp PageDETLinear,0
Expand Down Expand Up @@ -1864,7 +1866,8 @@ mem11_ok:
;
mov eax,LinearEntry ;get new entry number.
mov esi,1024*4096*1023 ;base of page alias's.
and DWORD PTR es:[esi+eax*4],NOT (PAGE_ACCESED or PAGE_DIRTY) ;clear accesed & dirty bits.
;clear accesed & dirty bits.
and DWORD PTR es:[esi+eax*4],NOT (PAGE_ACCESED or PAGE_DIRTY)
call EmuCR3Flush
;
mem11_NoRead:
Expand Down Expand Up @@ -1949,6 +1952,7 @@ mem12_NoWrap:
GetPageIndex eax ;get page number.
test DWORD PTR fs:[edi+eax*4],PAGE_PRESENT ;this page present?
jz mem12_ScanLoop
;is locked (lock count != 0)?
test DWORD PTR fs:[ebp+eax*4],MEM_LOCK_MASK shl MEM_LOCK_SHIFT
jnz mem12_ScanLoop
;
Expand Down Expand Up @@ -2113,17 +2117,18 @@ mem12_error_anyway:
;
pop edi
jc mem12_8
or DWORD PTR fs:[edi],PAGE_ON_DISK ;signal it living on disk.
;signal it living on disk.
or DWORD PTR fs:[edi],PAGE_ON_DISK
;
mem12_5:
;Now remove it from the page table and exit.
;
and DWORD PTR fs:[edi],NOT PAGE_PRESENT ;mark as not present.
mov edx,fs:[edi] ;get page entry.
mov edx,fs:[edi] ;get page entry.
mov ecx,edx
ClearUseBits edx ;lose use bits.
ClearUseBits edx ;lose use bits.
shr ecx,10
and ecx,1 ;preserve VCPI bit.
and ecx,1 ;preserve PAGE_VCPI bit.
call EmuCR3Flush
;
;Update number of un-locked physical pages present.
Expand Down Expand Up @@ -2185,8 +2190,10 @@ RawLockPage proc near
pop ax
;
mem13_WasLocked:
;is lock count overflow?
cmp ebx,MEM_LOCK_MASK
jz mem13_0
;increment lock count
add DWORD PTR es:[esi+eax*4],1 shl MEM_LOCK_SHIFT ;lock it.
mem13_0:
pop es
Expand Down Expand Up @@ -2215,6 +2222,7 @@ RawClearPageLock proc near
mov es,bx
GetPageIndex eax
mov esi,1024*4096*1022 ;base of page alias's.
;clear lock count
and DWORD PTR es:[esi+eax*4],NOT (MEM_LOCK_MASK shl MEM_LOCK_SHIFT) ;un-lock it.
pop es
pop esi
Expand Down Expand Up @@ -2244,6 +2252,7 @@ RawUnLockPage proc near
mov es,bx
GetPageIndex eax
mov esi,1024*4096*1022 ;base of page alias's.
;decrement lock count
sub DWORD PTR es:[esi+eax*4],1 shl MEM_LOCK_SHIFT ;un-lock it.
mov eax,DWORD PTR es:[esi+eax*4]
shr eax,MEM_LOCK_SHIFT
Expand Down
4 changes: 2 additions & 2 deletions bld/causeway/asm/raw_vcpi.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2380,9 +2380,9 @@ rv31_Use16Bit13:
shl esi,4
add esi,eax
mov ax,w[rv31_FlagsStore]
;clear IF & TF & DF
;clear IF & TF & DF.
and ax,NOT (EFLAG_IF or EFLAG_TF or EFLAG_DF)
;retain IF & TF & DF
;retain IF & TF & DF.
and WORD PTR fs:[esi+IFrame16.i16_flags],EFLAG_IF or EFLAG_TF or EFLAG_DF
or fs:[esi+IFrame16.i16_flags],ax
;
Expand Down

0 comments on commit 0729fd5

Please sign in to comment.