0 Members and 2 Guests are viewing this topic.
; Program Name: Memory Checker; Author: David Gomes; Version: <<1>>.<1>; Written for Doors CS <<1>>.<1> and higher.nolist#include "ti83plus.inc"#include "dcs7.inc".list .org progstart .db $BB,$6DInit: B_CALL (_ClrLCDFull) set textWrite,(IY + sGrFlags) set fracDrawLFont,(IY + fontFlags) ld a,1 ld (penCol), a ld (penRow), a ld hl,Title B_CALL (_VPutS) ld a,17 ld (penRow),a ld a,1 ld (penCol),a ld hl,RAMText B_CALL (_VPutS) ld a,41 ld (penRow),a ld a,1 ld (penCol),a ld hl,ARCText B_CALL (_VPutS) ld h,0 ld l,9 ld d,95 ld e,9 ld a,1 call fastline res fracDrawLFont,(IY + fontFlags) ld a,10 ld (penRow),a ld a,20 ld (penCol),a B_CALL (_memchk) call VDispHL ld a,17 ld (penRow),a ld a,20 ld (penCol),a ld hl,OutOf B_CALL (_VPutS) ld a,24 ld (penRow),a ld a,20 ld (penCol),a ld hl,24756 call VDispHL call GetFreeArc ld a,35 ld (penRow),a ld a,20 ld (penCol),a B_CALL (_VPutS) ld a,41 ld (penRow),a ld a,20 ld (penCol),a ld hl,OutOf B_CALL (_VPutS) call GetTotalArc ld a,47 ld (penRow),a ld a,20 ld (penCol),a B_CALL (_VPutS) call iFastCopy B_CALL (_GetKey) res textWrite,(IY + sGrFlags) retRAMText: .db <0>,0ARCText: .db <0>,0Title: .db <0>,0OutOf: .db <0>,0;The following code was made by Runer112GetTotalArc:;——————————————————————————————————————————————;;—> Returns the total amount of user archive as a <0>-character decimal string;INPUTS: none;OUTPUTS: hl=pointer to string (OP3);DESTROYS: af bc de ix;——————————————————————————————————————————————; B_CALL($80BA) add a,a add a,a ld d,0 ld e,a ld hl,GetTotalArc_HWValues add hl,de jr ConvArcGetTotalArc_HWValues: .db (10*$4000)>;><3>&<4>,(<0><1><2>)>><<13>>&<4>,(<0><1><2>)>><13>&<4>,(<0><1><2>)&<4> .db (94*$4000)>;><3>&<4>,(<0><1><2>)>><<13>>&<4>,(<0><1><2>)>><13>&<4>,(<0><1><2>)&<4> .db (30*$4000)>;><3>&<4>,(<0><1><2>)>><<13>>&<4>,(<0><1><2>)>><13>&<4>,(<0><1><2>)&<4> .db (94*$4000)>;><3>&<4>,(<0><1><2>)>><<13>>&<4>,(<0><1><2>)>><13>&<4>,(<0><1><2>)&<4>GetFreeArc:;——————————————————————————————————————————————;;—> Returns the amount of free archive as a <0>-character decimal string;INPUTS: none;OUTPUTS: hl=pointer to string (OP3);DESTROYS: af bc de ix;——————————————————————————————————————————————; B_CALL($5014) ;ArcChk ex de,hl inc hlConvArc:;——————————————————————————————————————————————;;—> Converts a <0>-bit integer into a <1>-character decimal string;INPUTS: hl=pointer to <0>-bit integer (big-endian);OUTPUTS: hl=pointer to string (OP3);DESTROYS: af bc de ix;——————————————————————————————————————————————; rst 20h ld hl,OP3+7 ld de,10 ld (hl),d ld b,7ConvArc_Loop1: push bc push hl B_CALL($80B1) ;Div32By16 pop hl pop bc ld a,(OP2+3) add a,'0' dec hl ld (hl),a djnz ConvArc_Loop1 ld d,h ld e,l ld bc,6<;<<1>+<2>ConvArc_Loop2: ld a,(de) cp c ret nz ld a,' ' ld (de),a inc de djnz ConvArc_Loop2 ret
Yeah, I wasn't aware of that one when I started making this
GetTotalArc_HWValues: .db (10*$4000)>;><3>&<4>,(<0><1><2>)>><<13>>&<4>,(<0><1><2>)>><13>&<4>,(<0><1><2>)&<4> .db (94*$4000)>;><3>&<4>,(<0><1><2>)>><<13>>&<4>,(<0><1><2>)>><13>&<4>,(<0><1><2>)&<4> .db (30*$4000)>;><3>&<4>,(<0><1><2>)>><<13>>&<4>,(<0><1><2>)>><13>&<4>,(<0><1><2>)&<4> .db (94*$4000)>;><3>&<4>,(<0><1><2>)>><<13>>&<4>,(<0><1><2>)>><13>&<4>,(<0><1><2>)&<4>
BootExe:; File Header dw BootExeEnd-BootExe ; Size of File; Executable Header db 0 ; Size of Stack neededBootExeStart:; End Headers Start Data ldrDE(_-BootExeStart) call LoadFileToRAM if(SUCCESS) jp nz, KernelPanic ex de,hl rDrawWrappedString rFastCopy call FlushKeys call WaitKey rEndThread_ db <0>,0BootExeEnd:
Hrm, it seems to not parse db "string",0 statements correctly
everything else is great though, maybe add in some highlighting for commands too?
Quote from: Eeems on June 24, 2011, 07:52:07 pmHrm, it seems to not parse db "string",0 statements correctlyYeah, there are a few issues with numbers.Quote from: Eeems on June 24, 2011, 07:52:07 pmeverything else is great though, maybe add in some highlighting for commands too?Definitely, and also registers, bcalls, and everything else I highlight in my gedit scheme file.
Quote from: Deep Thought on June 24, 2011, 08:04:34 pmQuote from: Eeems on June 24, 2011, 07:52:07 pmHrm, it seems to not parse db "string",0 statements correctlyYeah, there are a few issues with numbers.Quote from: Eeems on June 24, 2011, 07:52:07 pmeverything else is great though, maybe add in some highlighting for commands too?Definitely, and also registers, bcalls, and everything else I highlight in my gedit scheme file.Maybe add in support for KOS and RogueOS calls too? ( when they are finalized of course )
; Program Name: Memory Checker; Author: David Gomes; Version: 1.0; Written for Doors CS 7.0 and higher.nolist#include "ti83plus.inc"#include "dcs7.inc".list .org progstart .db $BB,$6DInit: B_CALL (_ClrLCDFull) set textWrite,(IY + sGrFlags) set fracDrawLFont,(IY + fontFlags) ld a,1 ld (penCol), a ld (penRow), a ld hl,Title B_CALL (_VPutS) ld a,17 ld (penRow),a ld a,1 ld (penCol),a ld hl,RAMText B_CALL (_VPutS) ld a,41 ld (penRow),a ld a,1 ld (penCol),a ld hl,ARCText B_CALL (_VPutS) ld h,0 ld l,9 ld d,95 ld e,9 ld a,1 call fastline res fracDrawLFont,(IY + fontFlags) ld a,10 ld (penRow),a ld a,20 ld (penCol),a B_CALL (_memchk) call VDispHL ld a,17 ld (penRow),a ld a,20 ld (penCol),a ld hl,OutOf B_CALL (_VPutS) ld a,24 ld (penRow),a ld a,20 ld (penCol),a ld hl,24756 call VDispHL call GetFreeArc ld a,35 ld (penRow),a ld a,20 ld (penCol),a B_CALL (_VPutS) ld a,41 ld (penRow),a ld a,20 ld (penCol),a ld hl,OutOf B_CALL (_VPutS) call GetTotalArc ld a,47 ld (penRow),a ld a,20 ld (penCol),a B_CALL (_VPutS) call iFastCopy B_CALL (_GetKey) res textWrite,(IY + sGrFlags) ret RAMText: .db "RAM",0 ARCText: .db "ARC",0 Title: .db "Memory Checker",0 OutOf: .db "out of",0 ;The following code was made by Runer112GetTotalArc:;——————————————————————————————————————————————;;—> Returns the total amount of user archive as a 7-character decimal string;INPUTS: none;OUTPUTS: hl=pointer to string (OP3);DESTROYS: af bc de ix;——————————————————————————————————————————————; B_CALL($80BA) add a,a add a,a ld d,0 ld e,a ld hl,GetTotalArc_HWValues add hl,de jr ConvArcGetTotalArc_HWValues: .db (10*$4000)>>24&$FF,(10*$4000)>>16&$FF,(10*$4000)>>8&$FF,(10*$4000)&$FF .db (94*$4000)>>24&$FF,(94*$4000)>>16&$FF,(94*$4000)>>8&$FF,(94*$4000)&$FF .db (30*$4000)>>24&$FF,(30*$4000)>>16&$FF,(30*$4000)>>8&$FF,(30*$4000)&$FF .db (94*$4000)>>24&$FF,(94*$4000)>>16&$FF,(94*$4000)>>8&$FF,(94*$4000)&$FF GetFreeArc:;——————————————————————————————————————————————;;—> Returns the amount of free archive as a 7-character decimal string;INPUTS: none;OUTPUTS: hl=pointer to string (OP3);DESTROYS: af bc de ix;——————————————————————————————————————————————; B_CALL($5014) ;ArcChk ex de,hl inc hl ConvArc:;——————————————————————————————————————————————;;—> Converts a 32-bit integer into a 7-character decimal string;INPUTS: hl=pointer to 32-bit integer (big-endian);OUTPUTS: hl=pointer to string (OP3);DESTROYS: af bc de ix;——————————————————————————————————————————————; rst 20h ld hl,OP3+7 ld de,10 ld (hl),d ld b,7ConvArc_Loop1: push bc push hl B_CALL($80B1) ;Div32By16 pop hl pop bc ld a,(OP2+3) add a,'0' dec hl ld (hl),a djnz ConvArc_Loop1 ld d,h ld e,l ld bc,6<<8+'0'ConvArc_Loop2: ld a,(de) cp c ret nz ld a,' ' ld (de),a inc de djnz ConvArc_Loop2 ret