# HG changeset patch # User Laurens Holst # Date 1542404714 -3600 # Fri Nov 16 22:45:14 2018 +0100 # Node ID 37a18588ee27cf519c8aef1c2fda697e2ee78bd7 # Parent df2af69889bcac7e7e2f490102fa9cfd31f91b92 Application: Use DOS_TerminateIfError instead of Application_CheckDOSError. diff --git a/.hgsubstate b/.hgsubstate --- a/.hgsubstate +++ b/.hgsubstate @@ -1,1 +1,1 @@ -494955e3891fd4ac75d3e9c0d39864e7e7ab0ee5 lib/neonlib +1ac84a131087f16ca3dd4413f90397ef64f08bc7 lib/neonlib diff --git a/src/Application.asm b/src/Application.asm --- a/src/Application.asm +++ b/src/Application.asm @@ -297,7 +297,7 @@ push de ld b,(iy + FileReader.fileHandle) call DOS_GetFileHandlePointer - call Application_CheckDOSError + call DOS_TerminateIfError push de push hl ld a,2 @@ -305,7 +305,7 @@ ld de,-4 >> 16 ld b,(iy + FileReader.fileHandle) call DOS_MoveFileHandlePointer - call Application_CheckDOSError + call DOS_TerminateIfError ld e,ixl ld d,ixh ld hl,Application.outputSize @@ -314,12 +314,12 @@ ld hl,4 ld b,(iy + FileReader.fileHandle) call DOS_ReadFromFileHandle - call Application_CheckDOSError + call DOS_TerminateIfError pop hl pop de ld b,(iy + FileReader.fileHandle) call DOS_SetFileHandlePointer - call Application_CheckDOSError + call DOS_TerminateIfError pop de ret @@ -335,7 +335,7 @@ push de ld b,(iy + FileWriter.fileHandle) call DOS_GetFileHandlePointer - call Application_CheckDOSError + call DOS_TerminateIfError push de push hl ld l,(ix + Application.outputSize) @@ -350,17 +350,17 @@ ex de,hl ld b,(iy + FileWriter.fileHandle) call DOS_SetFileHandlePointer - call Application_CheckDOSError + call DOS_TerminateIfError ld de,0 ; don’t care which value we write ld hl,1 ld b,(iy + FileWriter.fileHandle) call DOS_WriteToFileHandle - call Application_CheckDOSError + call DOS_TerminateIfError pop hl pop de ld b,(iy + FileWriter.fileHandle) call DOS_SetFileHandlePointer - call Application_CheckDOSError + call DOS_TerminateIfError pop de ret @@ -372,19 +372,6 @@ jp nc,System_TerminateWithError ret -; a = DOS error code -Application_CheckDOSError: - and a - ret z -Application_TerminateWithDOSError: - ld b,a - ld de,Application_explainBuffer - call DOS_ExplainErrorCode - ld hl,Application_explainBuffer - call System_Print - call System_PrintCrLf - jp System_TerminateWithError - ; Application_welcome: db "Gunzip 1.1 by Grauw",13,10,10,0 @@ -418,7 +405,4 @@ Application_instance: dw 0 -Application_explainBuffer: - ds 64,0 - ENDS