;Error routines/strings include "settings.inc" include "ti83plus.inc" include "equates.inc" include "usb8x.inc" SEGMENT Main GLOBALS ON EXTERN DispHexHL,IPutS,IGetKey,AppExit USBError: call dispError U_CALL GetErrorCode ld h,b ld l,c call DispHexHL ld hl,2 ld (curRow),hl call dispErrorString call IGetKey jr AppExit USBErrorNoDrv: call dispError ld hl,0 call DispHexHL ld l,2 ld (curRow),hl ld hl,sNoDriver call IPutS call IGetKey B_JUMP JForceCmdNoChar dispError: B_CALL ClrLCDFull B_CALL HomeUp ld hl,sError jr IPutS dispErrorString: call des_sub jr IPutS des_sub: ld hl,sErrorTable $$: ld a,(hl) or a jr z,$F cp b jr nz,$B inc hl B_CALL ldhlind ret $$: ld hl,sUnknownError ret sError: DB "ERROR ",0 sNoDriver: DB "usb8x (USBDRV8X)" DB "was not found.",0 sUnknownError: DB "There was an " DB "unknown problem " DB "and print8x must" DB "stop.",0 sErrorTable: DB 0