Commit 96988ed4 authored by Robert Sprowson's avatar Robert Sprowson Committed by ROOL

Fix for bad error pointer *Dump'ing with a given start offset

Trying to dump a file larger than 2GB starting from an offset below 2GB would fail because the compare checking whether PTR#han > EXT#han accidentally set V which was taken as an error (but with R0 not really being an error block).
parent fd81a66c
......@@ -1059,20 +1059,22 @@ Dump_Code Entry "$UtilRegs"
ADD r2, r3, r2 ; Display offset = disparm/loadaddr+ptr
10 Swap r2, r3 ; r2 := start, r3 := disp start
CMP r2, r4 ; Is ptr > ext ? VClear
MOVHI r1, r5
BLHI SetErrorOutsideFile
CMP r2, r4 ; Is ptr > ext ?
MOV r1, r5
BLS %FT11
MOVVC r0, #OSArgs_SetPTR
MOVVC r1, r5
SWIVC XOS_Args ; PTR#r1 := start offset
BL SetErrorOutsideFile
BVS UtilityExitCloseR1
11
MOV r0, #OSArgs_SetPTR
SWI XOS_Args ; PTR#r1 := start offset
MOVVC r7, #0
BLVC ReadWindowWidth
BVS UtilityExitCloseR1
SUB r9, r0, #12+1 ; -ExtraFields (address and separators)
MOV r9, r9, LSR #2 ; Two nibbles, one space and one char per byte
MOV r9, r9, LSR #2 ; Two nibbles, one space and one char per byte
Push r10 ; Save format bits
MOV r10, #(1 :SHL: 31) ; Move 1 bit down until not zero
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment