!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! SUB: Hello !! PURPOSE: To display a simple message !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! program Hello !! display our message, note that we only have 39 characters dpy HELLO WORLD
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! SUB: MainProgram !! PURPOSE: Start our program !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! program MainProgram declarations assign REG9 to Params execute Intro !! invoke another program dpy READY TO WORK !! time to chew bubble gum !! and write code. !! .. and I'm all outta gum dpy YOU PRESSED $Params !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! SUB: Intro !! PURPOSE: Tell the user what this program is, in case they forgot. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! program Intro declarations assign REG9 to INPUT !! we will capture input !! get input dpy EX 2 <TYPE NUMBER, PRESS ENT>/9
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! SUB: DumpMemory !! PURPOSE: Dumps a range of address space and sends it to aux !! REG8 = start address !! REG9 = end address !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! program DumpMemory declarations assign REG1 to lowAddr assign REG2 to highAddr assign REG3 to currAddr assign REG4 to loopCnt init: lowAddr = REG8 !! redundant, but very clear highAddr = REG9 !! our stopping point currAddr = lowAddr !! we'll read from this address aux _ aux ADDR__00_01_02_03+ aux _04_05_06_07_08+ aux _09_0A_0B_0C_0D+ aux _0E_0F aux ====__==_==_==_==+ aux _==_==_==_==_==+ aux _==_==_==_==_==+ aux _==_==+ Loop1: aux _ !! new line REG9 = currAddr !! parameter to AuxAddress execute AuxAddress !! display it in HHHH format aux _+ !! space !! we are always going to do 8 bytes !! reguardless of the range. loopCnt = 10 Loop2: READ @ currAddr !! read data aux _+ !! space REG9 = DAT !! pass parameter execute AuxData !! send data to aux inc currAddr !! increment our current counter dec loopCnt !! decrement line counter if loopCnt > 0 goto Loop2 !! still more to output on this line !! are we done? Did we output all of the data? if highAddr >= currAddr goto Loop1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! SUB: AuxAddress !! PURPOSE: Sends an address to the aux channel !! REG9 = address to ouput !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! program AuxAddress declarations assign REG1 to addr1 !! get parameter addr1 = REG9 !! more readable output if addr1 > 0FFF goto SendAddr aux 0+ if addr1 > 00FF goto SendAddr aux 0+ if addr1 > 000F goto SendAddr aux 0+ SendAddr: aux $addr1+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! SUB: AuxData !! PURPOSE: Sends data to the aux channel !! REG9 = data to ouput !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! program AuxData declarations assign REG1 to data1 !! get parameter data1 = REG9 !! more readable output if data1 > 000F goto SendData aux 0+ SendData: aux $data1+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Set up code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! setup exercise errors yes include "6809E.POD" !! your POD may vary... POD 6809E !! tells compiler what POD we're using !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Main Menu: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! program Menu dpy START DUMP AT /8 dpy END DUMP AT /9 execute DumpMemory goto Menu !! assumes this is where you placed Dump Memory.9lc !! assumes that you are using FIDE !! and note that include files get included right where you !! put the include statement. include "~/Utils/Lib/Dump Memory.9lc"