From 4d9d7b5600ab615d68f671df5f8bc6c9fe4a5a09 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Wed, 24 Apr 2019 11:03:58 -0400 Subject: add pause to curses, remove unfinished calculator frontend --- .../CEdev/examples/debugging/obj/main.src | 484 --------------------- 1 file changed, 484 deletions(-) delete mode 100644 frontends/calculator/CEdev/examples/debugging/obj/main.src (limited to 'frontends/calculator/CEdev/examples/debugging/obj') diff --git a/frontends/calculator/CEdev/examples/debugging/obj/main.src b/frontends/calculator/CEdev/examples/debugging/obj/main.src deleted file mode 100644 index 4a90981..0000000 --- a/frontends/calculator/CEdev/examples/debugging/obj/main.src +++ /dev/null @@ -1,484 +0,0 @@ -; Zilog eZ80 ANSI C Compiler Release 3.4 -; -debug -optsize -noreduceopt -nomodsect -peephole -globalopt -; -localcse -const=ROM - FILE "SRC\MAIN.C" - .assume ADL=1 -.DEBUG "C" - SEGMENT CODE -.BEGREC "NONAME0",9 -.DEFINE "sign" -.VALUE 0 -.CLASS 8 -.TYPE 2 -.ENDEF -.DEFINE "exp" -.VALUE 1 -.CLASS 8 -.TYPE 2 -.ENDEF -.DEFINE "mant" -.VALUE 2 -.CLASS 8 -.DIM 7 -.TYPE 108 -.ENDEF -.ENDREC "NONAME0" -.BEGREC "NONAME1",18 -.DEFINE "real" -.VALUE 0 -.CLASS 8 -.TAG "NONAME0" -.TYPE 8 -.ENDEF -.DEFINE "imag" -.VALUE 9 -.CLASS 8 -.TAG "NONAME0" -.TYPE 8 -.ENDEF -.ENDREC "NONAME1" -.BEGREC "NONAME2",11 -.DEFINE "dim" -.VALUE 0 -.CLASS 8 -.TYPE 13 -.ENDEF -.DEFINE "items" -.VALUE 2 -.CLASS 8 -.DIM 1 -.TAG "NONAME0" -.TYPE 104 -.ENDEF -.ENDREC "NONAME2" -.BEGREC "NONAME3",20 -.DEFINE "dim" -.VALUE 0 -.CLASS 8 -.TYPE 13 -.ENDEF -.DEFINE "items" -.VALUE 2 -.CLASS 8 -.DIM 1 -.TAG "NONAME1" -.TYPE 104 -.ENDEF -.ENDREC "NONAME3" -.BEGREC "NONAME4",11 -.DEFINE "cols" -.VALUE 0 -.CLASS 8 -.TYPE 12 -.ENDEF -.DEFINE "rows" -.VALUE 1 -.CLASS 8 -.TYPE 12 -.ENDEF -.DEFINE "items" -.VALUE 2 -.CLASS 8 -.DIM 1 -.TAG "NONAME0" -.TYPE 104 -.ENDEF -.ENDREC "NONAME4" -.BEGREC "NONAME5",3 -.DEFINE "len" -.VALUE 0 -.CLASS 8 -.TYPE 13 -.ENDEF -.DEFINE "data" -.VALUE 2 -.CLASS 8 -.DIM 1 -.TYPE 98 -.ENDEF -.ENDREC "NONAME5" -.BEGREC "NONAME6",3 -.DEFINE "len" -.VALUE 0 -.CLASS 8 -.TYPE 13 -.ENDEF -.DEFINE "data" -.VALUE 2 -.CLASS 8 -.DIM 1 -.TYPE 98 -.ENDEF -.ENDREC "NONAME6" -.BEGREC "NONAME7",3 -.DEFINE "size" -.VALUE 0 -.CLASS 8 -.TYPE 13 -.ENDEF -.DEFINE "data" -.VALUE 2 -.CLASS 8 -.DIM 1 -.TYPE 108 -.ENDEF -.ENDREC "NONAME7" -.BEGREC "fmt_type",19 -.DEFINE "status" -.VALUE 0 -.CLASS 8 -.TYPE 12 -.ENDEF -.DEFINE "flags" -.VALUE 1 -.CLASS 8 -.TYPE 12 -.ENDEF -.DEFINE "size" -.VALUE 2 -.CLASS 8 -.TYPE 2 -.ENDEF -.DEFINE "chr" -.VALUE 3 -.CLASS 8 -.TYPE 2 -.ENDEF -.DEFINE "type" -.VALUE 4 -.CLASS 8 -.TYPE 2 -.ENDEF -.DEFINE "field_width" -.VALUE 5 -.CLASS 8 -.TYPE 2 -.ENDEF -.DEFINE "precision" -.VALUE 6 -.CLASS 8 -.TYPE 2 -.ENDEF -.DEFINE "set_begin" -.VALUE 7 -.CLASS 8 -.TYPE 34 -.ENDEF -.DEFINE "set_end" -.VALUE 10 -.CLASS 8 -.TYPE 34 -.ENDEF -.DEFINE "pad_whole" -.VALUE 13 -.CLASS 8 -.TYPE 12 -.ENDEF -.DEFINE "pad_pre_fract" -.VALUE 14 -.CLASS 8 -.TYPE 12 -.ENDEF -.DEFINE "pad_post_fract" -.VALUE 15 -.CLASS 8 -.TYPE 12 -.ENDEF -.DEFINE "pad_at" -.VALUE 16 -.CLASS 8 -.TYPE 34 -.ENDEF -.ENDREC "fmt_type" -.BEGREC "flt_info",12 -.DEFINE "flags" -.VALUE 0 -.CLASS 8 -.TYPE 12 -.ENDEF -.DEFINE "exp" -.VALUE 1 -.CLASS 8 -.TYPE 2 -.ENDEF -.DEFINE "digits" -.VALUE 2 -.CLASS 8 -.DIM 10 -.TYPE 108 -.ENDEF -.ENDREC "flt_info" -.BEGREC "NONAME8",6 -.DEFINE "quot" -.VALUE 0 -.CLASS 8 -.TYPE 4 -.ENDEF -.DEFINE "rem" -.VALUE 3 -.CLASS 8 -.TYPE 4 -.ENDEF -.ENDREC "NONAME8" -.BEGREC "NONAME9",8 -.DEFINE "quot" -.VALUE 0 -.CLASS 8 -.TYPE 5 -.ENDEF -.DEFINE "rem" -.VALUE 4 -.CLASS 8 -.TYPE 5 -.ENDEF -.ENDREC "NONAME9" -.BEGREC "header",6 -.DEFINE "s" -.VALUE 0 -.CLASS 11 -.TAG "NONAME10" -.TYPE 8 -.ENDEF -.DEFINE "x" -.VALUE 0 -.CLASS 11 -.TYPE 2 -.ENDEF -.ENDREC "header" -.BEGREC "NONAME10",6 -.DEFINE "ptr" -.VALUE 0 -.CLASS 8 -.TAG "header" -.TYPE 40 -.ENDEF -.DEFINE "size" -.VALUE 3 -.CLASS 8 -.TYPE 14 -.ENDEF -.ENDREC "NONAME10" -.BEGREC "__stdio_file",1 -.DEFINE "slot" -.VALUE 0 -.CLASS 8 -.TYPE 12 -.ENDEF -.ENDREC "__stdio_file" -; 1 #include -; 2 #include -; 3 #include -; 4 #include -; 5 -; 6 #include -; 7 #include -; 8 -; 9 /* -; 10 * Even though debug.h has prototypes for Debugger, SetWriteWatchpoint, SetWatchpoint, RemoveWatchpoint, RemoveAllWatchpoints, RemoveAllBreakpoints... -; 11 * you have to use the dbg_ prefix as shown here: -; 12 */ -; 13 -; 14 void main(void) { -_main: -.DEFINE "_main" - -.VALUE _main - -.CLASS 2 - -.TYPE 65 - -.ENDEF - -.BEGFUNC "main",14,"_main" - -.LINE 14 - -.DEFINE "dbg_test_var_2" - -.CLASS 65 - -.VALUE -1 - -.TYPE 12 - -.ENDEF - -.DEFINE "dbg_test_var_1" - -.CLASS 65 - -.VALUE -4 - -.TYPE 4 - -.ENDEF - - PUSH IX - LD IX,0 - ADD IX,SP - PUSH BC - DEC SP -; 15 /* Set the intial value of some variables */ -; 16 int dbg_test_var_1 = 10; -.LINE 16 - - LD BC,10 - LD (IX+-4),BC -; 17 uint8_t dbg_test_var_2 = 3; -.LINE 17 - - LD (IX+-1),3 -; 18 -; 19 /* Print a simple debugging string */ -; 20 dbg_sprintf(dbgout, "This is the start of a CEmu debugging test\n"); -.LINE 20 - - LD BC,L__0 - PUSH BC - LD BC,16449536 - PUSH BC - CALL _sprintf - POP BC - POP BC -; 21 -; 22 /* You can enter the debugger manually */ -; 23 dbg_Debugger(); -.LINE 23 - - CALL _dbg_Debugger -; 24 -; 25 /* Set a watchpoint that will break anytime we write/change this variable */ -; 26 dbg_SetWriteWatchpoint(&dbg_test_var_1, sizeof dbg_test_var_1); -.LINE 26 - - LD BC,3 - PUSH BC - PEA IX+-4 - CALL _dbg_SetWriteWatchpoint - POP BC - POP BC -; 27 -; 28 /* Set a non breaking watchpoint just so we can see what is in this variable at any given time */ -; 29 dbg_SetWatchpoint(&dbg_test_var_2, sizeof dbg_test_var_2); -.LINE 29 - - LD BC,1 - PUSH BC - PEA IX+-1 - CALL _dbg_SetWatchpoint - POP BC - POP BC -; 30 -; 31 /* Now, let's write to the variable to see what happens (Go to the 'Watchpoints' tab in CEmu to view the status) */ -; 32 dbg_test_var_1 = 5; -.LINE 32 - - LD BC,5 - LD (IX+-4),BC -; 33 -; 34 /* Remove the watchpoint that we had set */ -; 35 dbg_RemoveWatchpoint(&dbg_test_var_1); -.LINE 35 - - PEA IX+-4 - CALL _dbg_RemoveWatchpoint - POP BC -; 36 dbg_RemoveWatchpoint(&dbg_test_var_2); -.LINE 36 - - PEA IX+-1 - CALL _dbg_RemoveWatchpoint - POP BC -; 37 -; 38 /* We can also use those */ -; 39 dbg_RemoveAllWatchpoints(); -.LINE 39 - - CALL _dbg_RemoveAllWatchpoints -; 40 dbg_RemoveAllBreakpoints(); -.LINE 40 - - CALL _dbg_RemoveAllBreakpoints -; 41 -; 42 /* Set this value to zero */ -; 43 dbg_test_var_2 = 0; -.LINE 43 - - LD (IX+-1),0 -; 44 -; 45 /* Fail this assertion */ -; 46 assert(dbg_test_var_2); -.LINE 46 - - LD A,(IX+-1) - OR A,A - JR NZ,L_3 - LD BC,46 - PUSH BC - LD BC,L__2 - PUSH BC - LD BC,L__3 - PUSH BC - LD BC,L__4 - PUSH BC - LD BC,16449536 - PUSH BC - CALL _sprintf - POP BC - POP BC - POP BC - POP BC - POP BC - CALL _abort -; 47 } -L_3: -.LINE 47 - - LD SP,IX - POP IX - RET - - -;**************************** _main *************************** -;Name Addr/Register Size Type -;_abort IMPORT ----- function -;_dbg_RemoveAllBreakpoints IMPORT ----- function -;_dbg_RemoveAllWatchpoints IMPORT ----- function -;_dbg_RemoveWatchpoint IMPORT ----- function -;_dbg_SetWatchpoint IMPORT ----- function -;_dbg_SetWriteWatchpoint IMPORT ----- function -;_dbg_Debugger IMPORT ----- function -;_sprintf IMPORT ----- function -;dbg_test_var_1 IX-4 3 variable -;dbg_test_var_2 IX-1 1 variable - - -; Stack Frame Size: 10 (bytes) -; Spill Code: 0 (instruction) - - -.ENDFUNC "main",47,"_main" - SEGMENT STRSECT -L__0: - DB "This is the start of a CEmu debugging test" - DB 10,0 -L__2: - DB "Z:\\HOME\\WALTZ\\DOCUMENTS\\TOOLCHAIN\\EXAMPLES\\DEBUGGING\\SRC\\MAIN.C" - DB 0 -L__3: - DB "dbg_test_var_2" - DB 0 -L__4: - DB "Assertion failure: %s, file: %s, line %d" - DB 10,0 - XREF _dbg_RemoveAllBreakpoints:ROM - XREF _dbg_RemoveAllWatchpoints:ROM - XREF _dbg_RemoveWatchpoint:ROM - XREF _dbg_SetWriteWatchpoint:ROM - XREF _dbg_SetWatchpoint:ROM - XREF _dbg_Debugger:ROM - XREF _sprintf:ROM - XREF _abort:ROM - XDEF _main - END -- cgit v1.2.3-101-g0448