# HG changeset patch # User boisy # Date 1044035398 0 # Node ID 53553cdc265c263fdeafff82762bc695efd719be # Parent 4f56e6891d94fa4ee3a44c78948ac22b46a816a0 New commands added to standard CMDS diff -r 4f56e6891d94 -r 53553cdc265c level2/cmds/dmem.asm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/cmds/dmem.asm Fri Jan 31 17:49:58 2003 +0000 @@ -0,0 +1,141 @@ +******************************************************************** +* DMem - Dump memory from system +* +* $Id$ +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ +* 2 Written by Kevin Darling + + nam DMem + ttl Dump memory from system + +* Disassembled 98/09/14 19:24:59 by Disasm v1.6 (C) 1988 by RML + + ifp1 + use defsfile + endc + +tylg set Prgrm+Objct +atrv set ReEnt+rev +rev set $01 +edition set 2 + + mod eom,name,tylg,atrv,start,size + +u0000 rmb 1 +u0001 rmb 1 +u0002 rmb 1 +u0003 rmb 2 +u0005 rmb 3 +u0008 rmb 64 +u0048 rmb 1 +u0049 rmb 447 +u0208 rmb 4296 +size equ . + +name fcs /DMem/ + fcb edition + +L0012 clr u0008,u + os9 F$GPrDsc + lbcs L00BC + puls x + bra L0073 +L006D bsr L0012 + clr u0048,u + tfr x,d + ldy u0208,u + os9 F$CpyMem + puls u + bcs L00BC + ldy u0208,u + lda #$01 + os9 I$Write +L00BB clrb +L00BC os9 F$Exit + +HelpTxt fcc "Use: DMem [] ! dump" + fcb C$LF + fcc " or: DMem - [] ! dump" + fcb C$CR +HelpTxtL equ *-HelpTxt + +L0119 leax >HelpTxt,pcr +L011D ldy #HelpTxtL + lda #$02 + os9 I$WritLn + bra L00BB +L0128 lda ,x+ + cmpa #C$SPAC + beq L0128 + leax -1,x + cmpa #C$CR + rts + + emod +eom equ * + end diff -r 4f56e6891d94 -r 53553cdc265c level2/cmds/makefile --- a/level2/cmds/makefile Fri Jan 31 17:40:46 2003 +0000 +++ b/level2/cmds/makefile Fri Jan 31 17:49:58 2003 +0000 @@ -3,11 +3,12 @@ DEPENDS = ./Makefile CMDS = asm attr backup binex build cmp cobbler copy cputype \ - date dcheck debug deiniz del deldir devs dir disasm display \ - dmode dsave dump echo edit error exbin exmode format \ - free grfdrv help ident iniz irqs link list load login makdir \ - mdir merge mfree modpatch montype os9gen procs pwd pxd rename \ - runb save setime shell_21 shellplus sleep tee tmode touch \ + date dcheck debug deiniz del deldir devs dir dirm disasm \ + display dmem dmode dsave dump echo edit error exbin exmode \ + format free grfdrv help ident iniz irqs link list load login \ + makdir mdir merge mfree mmap modpatch montype os9gen proc \ + procs pwd pxd reboot rename runb save setime shell_21 \ + shellplus sleep smap tee tmode touch \ tsmon unlink verify wcreate xmode SUBS = gfx2 gfx inkey syscall diff -r 4f56e6891d94 -r 53553cdc265c level2/cmds/mmap.asm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/cmds/mmap.asm Fri Jan 31 17:49:58 2003 +0000 @@ -0,0 +1,287 @@ +******************************************************************** +* MMap - Show memory block map +* +* $Id$ +* +* From Kevin Darling, "Inside OS9 Level II" +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ +* ? Original verison KKD 88/??/?? +* 4 Modified by Ken Drexler fr various block sizes KD 89/07/30 + + nam MMap + ttl Memory Block Utility + + ifp1 + use defsfile + endc + +Revs set ReEnt+1 +Type set Prgrm+Objct +edition set 4 + + mod prglen,name,type,revs,MMap,datsiz + +Name fcs /MMap/ + fcb edition + +*************************************************** +* +* Data +* +buffsiz set 512 + +numflag rmb 1 flag for leading zeros +rowcnt rmb 1 no rows to print +free rmb 1 no free blocks +rowno rmb 1 row number +lcnt rmb 1 line length counter +outptr rmb 2 output pointer +out rmb 80 output buffer +mapsiz rmb 2 size of map block +blksiz rmb 2 block size +buffer rmb buffsiz map itself +stack rmb 200 +datsiz equ . + + pag +*************************************************** +* +* Messages +* +header fcc / 0 1 2 3 4 5 6 7 8 9 A B C D E F/ + fcb C$CR +hdrlen equ *-header + +hdr2 fcc / # = = = = = = = = = = = = = = = =/ + fcb C$CR +hdrlen2 equ *-hdr2 + +BlockMsg fcc / Block Size: / +blklen equ *-Blockmsg + +Freemsg fcc / Free Blocks: / +freelen equ *-Freemsg + +Rammsg fcc / KBytes Free: / +ramlen equ *-Rammsg + +********************************************** +* +MMap lbsr pcrtn print line + leax header,pcr print headers + lda #1 + ldy #hdrlen + os9 I$WritLn + leax hdr2,pcr + ldy #hdrlen2 + os9 I$WritLn + leax buffer,u get block map to read + os9 F$GBlkMp + lbcs error + std blksiz save block size + sty mapsiz save map size + clr free + clr rowno + ldd mapsiz compute number of rows + lsra at 16 per row + rorb + lsra + rorb + lsra + rorb + lsra + rorb + stb rowcnt save count + leax out,u + stx outptr + leax buffer,u point at map + pshs x + bra loop2 + +loop dec lcnt count -= 1 + bne loop3 if more, skip line print + +* print line, start next line +loop1 pshs x save map pointer + lbsr prline print line + dec rowcnt done? + beq exit yes +loop2 lda #16 set line length count + sta lcnt + lbsr Space 1 space + lda rowno print row number + lbsr Hex1 + inc rowno row number += 1 + lbsr space2 2 spaces + puls x + +* Print one block status +loop3 ldb ,x+ get next block + beq freeram + bmi noram + bitb #2 module? + bne module + lda #'U must be ram in use + bra put + +freeram lda #'_ not used + inc free count it + bra put + +module lda #'M module + bra put + +noram lda #'. not ram + +* Print character in A and space +put equ * + lbsr print put character in output buffer + lda #C$SPAC add space + lbsr print + + bra loop + +* Add summary messages +Exit equ * + leax BlockMsg,pcr print "Block Size" + ldy #blklen + lbsr Prstr + ldd blksiz + clr numflag suppress zeros + bsr outdec + lbsr prline print line + leax freemsg,pcr print "Free Blocks" + ldy #freelen + lbsr Prstr + ldb free get number of blocks + clra + clr numflag suppress zeros + bsr outdec print in decimal + bsr prline + leax rammsg,pcr print "Ram Free" + ldy #ramlen + lbsr Prstr + ldb free get number of blocks + lda blksiz get #k/block + lsra by dividing msb by 4 + lsra + mul + clr numflag suppress zeros + bsr outdec print in decimal + bsr prline + +bye clrb no errors + +error os9 F$Exit + + +********************************************** +* +* Subroutines +* +Pcrtn pshs a,x Output carriage return + lda #C$CR + sta out + leax out,u point at buffer + ldy #1 one char. + lda #1 + os9 I$WritLn + puls a,x,pc + + +** Decimal output routine +* IN: D - number to output +* X - destination buffer +* OUT: X,Y,U preserved +* +Outdec pshs b,x,y,u + ldx outptr get pointer + leau = 255 --> exit + lda Pid get proc id + leax Buffer,U set destination + os9 F$GPrDsc + bcs Main loop if no descriptor + bsr Output print data for descriptor + bra Main + +Bye clrb +Error os9 F$Exit + +* Subroutines + +Output lda P$ID,X process id + lbsr Outdecl + lbsr Space + lbsr Space + +* Print Process DAT Image +* IN: x = process descriptor +* + pshs X + leax P$DATImg,x point to DAT image + ldb blkcnt set count + pshs b + +PrntImg ldd ,x++ get DAT block + cmpd #$00FC empty? + bne prntimg2 + ldy lineptr + ldd #".. + std ,y++ + sty lineptr + lbsr space + bra prntimg3 + +PrntImg2 tfr b,a print block no. + lbsr Out2HS + +PrntImg3 dec ,s count -= 1 + bne Prntimg + puls b,x + +* Print primary module name +* IN: X - process descriptor +* + lbsr Space + leay P$DATImg,X + tfr Y,D d=dat image + std datimg save pointer + ldx P$PModul,X x=offset in map + bne doname + leax >sysnam,pcr point at name + ldy lineptr + ldb #syslen + +Copy lda ,x+ + sta ,y+ + decb + bne copy + bsr Name2 + bra Printlin + +Doname bsr Printnam + +* Print Line +Printlin ldx lineptr terminate line + lda #C$CR + sta ,X + ldu umem + leax outbuf,U + +* Print line +PrintL1 ldy #80 + lda #stdout + os9 I$Writln + bcs Error + rts + +** Find and print a module name +* IN: X - module offset +* U - data area +* datimg = pointer +* +Printnam equ * + +* Read module header + pshs U save u + leau hdr,U destination + ldd datimg proc datimg pointer + ldy #10 set length + os9 F$CpyMem + lbcs Error + +* Read name from Module to buffer + ldd M$Name,U get name offset from header + ldu lineptr move name to outbuf + leax D,X X - offset to name + ldd datimg + ldy #maxnam set maximum length + os9 F$CpyMem + puls U + lbcs Error + +Name2 pshs X + ldx lineptr + clrb set length = 0 +Name3 incb + lda ,X+ + bpl Name3 + cmpb #40 + bcc Name5 + anda #$7F clear d7 + sta -1,X + cmpb #9 + bcc Name5 + lda #C$SPAC +Name4 sta ,X+ + incb + cmpb #9 + bcs Name4 +Name5 stx lineptr + puls X,PC + +* Print hex digit in A +Out2HS bsr Hexl + +Space lda #C$SPAC + bra Print + + +* Print Hexidecimal Digit in A +Hexl tfr A,B + lsra + lsra + lsra + lsra + bsr Outhex + tfr B,A +Outhex anda #$0F + cmpa #$0A 0 - 9 + bcs Outdig + adda #$07 A - F +Outdig adda #'0 make ASCII + +* Put character in A in buf +Print pshs X + ldx lineptr + sta ,X+ + stx lineptr + puls X,PC + +* Print 1 Decimal Digit in A +* +Outdecl tfr A,B number to B + clra + +* Print 2 Decimal Digits in D +Outdec clr leadflag + pshs X + ldx umem + leax number,X + clr ,X + clr 1,X + clr 2,X +Hundred inc ,X + subd #100 + bcc Hundred + addd #100 +Ten inc 1,X + subd #10 + bcc Ten + addd #10 + incb + stb 2,X + bsr Printled + bsr Printled + bsr Printnum + bsr Space + puls X,PC + +Printnum lda ,X+ get char + adda #'0-1 make ASCII + bra Print + +Printled tst leadflag print leading zero? + bne Printnum yes + ldb ,X is it zero? + inc leadflag + decb + bne Printnum no, print zeros + clr leadflag + lda #C$SPAC + leax 1,X + bra Print + + emod +Prgsiz equ * + end diff -r 4f56e6891d94 -r 53553cdc265c level2/cmds/proc.asm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/cmds/proc.asm Fri Jan 31 17:49:58 2003 +0000 @@ -0,0 +1,505 @@ +******************************************************************** +* Proc - Show process information +* +* $Id$ +* +* NOTE: SHOULD ADD IN TO HANDLE PRINTING NAME OF CURRENT MODULE +* RUNNING IN A RUNB or BASIC09 PROCESS +* +* From "Inside Level II" by Kevin Darling +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ +* 1 Original version KKD 88/10/28 +* ? Modified to show status in English, stderr ??? 89/07/30 +* and the system process +* 11 Modified to add current executing/editing LCB 94/11/08 +* module name for Basic09 and/or RunB programs + + nam Proc + ttl Show process information + + ifp1 + use defsfile + endc + +Type set Prgrm+Objct +Revs set ReEnt+1 +edition set 11 + +bufsiz set 512 +stdout set 1 + + pag +*************************************************** + mod PrgSiz,Name,Type,Revs,Entry,DatSiz + +Name fcs /Proc/ + fcb edition + +* Data Equates +umem rmb 2 Data mem ptr +sysimg rmb 2 pointer to sysprc datimg +datimg rmb 2 datimg for copymem +datimg2 rmb 2 2nd copy for non-descriptor use +basicflg rmb 1 Flag that primary module is BASIC09 or RUNB +outptr rmb 2 pointer in outbuf +number rmb 3 +leadflag rmb 1 +path rmb 3 stdin, stdout and stderr +pid rmb 1 +namlen rmb 1 +hdr rmb 64 +outbuf rmb 80 Buffer for output string +buffer rmb bufsiz working proc. desc. +sysprc rmb bufsiz system proc. desc. +stack rmb 200 +datsiz equ . + +************************************************** +* Messages +* Headers +Header fcc " ID Prnt User Pty Age Tsk Status Signal Module I/O Paths " + fcb C$CR +Hdrlen equ *-Header + +Header2 fcc /___ ____ ____ ___ ___ ___ _______ __ __ _________ __________________/ +Hdrcr fcb C$CR +Hdrlen2 equ *-Header2 + +* State Strings (6 characters each) +Quesstr fcc /??????/ +TimSlpSt fcc /TSleep/ +TimOStr fcc /TimOut/ +ImgChStr fcc /ImgChg/ +SuspStr fcc /Suspnd/ +CondmStr fcc /Condem/ +DeadStr fcc /Dead / +Spaces fcc / / +SystmSt fcc /System / + +* Special case module names +basic09 fcc 'BASIC' +b09sz equ *-basic09 +runb fcc 'RUNB' +runbsz equ *-runb +basicms2 fcc ')' + fcb C$CR +Nomodule fcc 'Not Defined' +Nomodsz equ *-Nomodule + +************************************************ +Entry stu sysprc,U get system proc. desc. + os9 F$GPrDsc + bcs Error + leax P$DatImg,X just for its dat image + stx + lbsr Print + lbsr Device +Stderr lda + lbsr Print print first > + lda #'> + lbsr Print + bsr Device +* Print Line + ldx 39 chars? + bhs Name5 Yes, skip ahead + anda #$7F Take out hi-bit + sta -1,X Save char back without hi-bit + cmpb oflag no os9boot + sta >kflag no kernel + sta >gflag no GrfDrv + sta >rbflag default to allowing '-r -b' options + + ldx #Param point to the start of the parameters again + stx >param.pt save pointer + +*================================================================== +* Check for more parameters +*================================================================== +Check ldx >param.pt get the current parameter pointer +check.p ldd ,x + cmpa #C$SPAC skip leading spaces + bne Contin + leax 1,x + bra check.p + +Contin cmpa #C$CR simply reboot + bne Hy check for hyphens + tst >rbflag are the '-r' '-b' options valid? + lbne Finalize no, finalize the boot, and reboot + lbra CrashIt yes, go ahead and crash the system. + +Hy cmpa #'- hyphen? + lbne Help + cmpb #'? help? + lbeq Help + andb #$DF make uppercase + tst >rbflag are the '-r' '-b' options valid? + bne o.flag no, skip ahead to checking other flags + cmpb #'B + lbeq CrashIt + + cmpb #'R reboot? + lbeq LoadIt + +*================================================================== +* Only -L -K -G options are valid here +*================================================================== +o.flag cmpb #'L load the OS9Boot file? + lbeq load.os9 yes, go load it + + cmpb #'K load the kernel file? + lbeq load.krn yes, go load it + + cmpb #'G load GrfDrv? + lbne Help no, print out a help message + +*================================================================== +* load in GrfDrv +*================================================================== +load.grf tst >gflag + lbne Help + stb >gflag + ldu #grfdrv where to put grfdrv + ldy #$2000 the maximum size it can be + bsr load.fil + lbra Check check for more options + +*================================================================== +* Load in the kernel +*================================================================== +load.krn tst >kflag already loaded the kernel? + lbne Help yes, print error + stb >kflag we're loading the kernel + ldu #kernel where to put the kernel + ldy #$1200 the size of the kernel + bsr load.fil load in the kernel file + lbra Check check for more options + +*================================================================== +* load the specified file +* Entry: X = parameter pointer +* Y = maximum size of the file to read +* U = pointer to load address for the file +*================================================================== +load.fil stb >rbflag don't allow -r -b any more + leax 2,x skip '-X' option + lda ,x+ grab the next character + cmpa #C$SPAC space? + lbne Help no, print help message + + pshs x save filename for later + lda #READ. read-only permissions + os9 I$Open open the file + lbcs fil.err + + stx >param.pt save parameter pointer for later + + tfr u,x put load address into X + os9 I$Read read in the OS9Boot file + lbcs fil.err + puls x,pc restore unused X, and exit + +*================================================================== +* load a new OS9Boot file +*================================================================== +load.os9 tst >oflag + lbne Help + stb >oflag flag we have an OS9Boot file requested + stb >rbflag and the '-r' or '-b' options are no longer valid + + ldu #$0000 where to put the information + ldy #MaxOS9Bt + lbsr load.fil go load the file into memory + sty >os9btsz save the size of the OS9Boot file for later +* do some syntax checking on the OS9Boot file... + lbra Check go check for more parameters + +*================================================================== +* finalize the crash of the system +*================================================================== +Finalize lbsr Seek seek /DD to 0 + os9 F$ID get my ID and process # + ldx #PrcDsc point to where to put the process descriptor + os9 F$GPrDsc get it + lbcs Exit + leax P$DATImg,x point to it's DAT image + + orcc #IntMasks shut off IRQ's + lda #$3F block $3F + sta >$FFA8 map in block $3F + + lda >oflag do OS9Boot? + bne do.os9bt yup, skip ahead + lda >gflag OS9Boot OR GrfDrv? + beq do.kern neither one, just do the kernel + lbra Help no OS9Boot, but trying to reload GrfDrv: invalid + +* copy our DAT image to block 0 +do.os9bt ldu #$0000 to the start of block $3F + ldd >os9btsz get the size of the OS9Boot file + std ,u++ save it for later + lda >gflag do we reload GrfDrv? + sta ,u+ save flag for later + ldb #16 copy the whole DAT image... +dat.lp lda ,x+ + sta ,u+ + decb + bne dat.lp + + lda >kflag do we move the kernel over? + beq no.kern if clear, we don't have a kernel in high memory + +do.kern pshs u save current pointer to $E000+x + ldu #$0D00 where to put the new kernel + ldx #kernel where the new kernel currently is located + ldy #$1200 the size of the kernel + bsr bt.lp copy the kernel over a byte at a time + puls u restore low memory pointer + + lda >oflag + ora >gflag OS9Boot OR GrfDrv? + lbeq LoadIt.0 nope, just the kernel: reboot quickly + +* copy the original BOOT module to block 0 +no.kern ldx #$0D00+$0130 block 0, offset $0D00+REL + bsr bt.copy + leax eom,pc point to the end of the module + ldu #$0D00+$0130 over top of the original BOOT module + bsr bt.copy + lbra LoadIt.0 and go re-load the OS9Boot file + +bt.copy ldy #$01D0 +bt.lp lda ,x+ + sta ,u+ + leay -1,y + bne bt.lp + rts + +*================================================================== +* crash the system +*================================================================== +CrashIt lbsr Seek seek /DD to track 0 + orcc #IntMasks turn off IRQ's + clrb + stb >$FFA8 map in block 0 + stb >$0071 cold reboot + lda #$38 bottom of DECB block mapping + sta >$FFA8 map in block zero + stb >$0071 and cold reboot here, too + ldu #$0000 force code to go at offset $0000 + leax ReBoot,pc reboot code + ldy #BtSize +cit.loop lda ,x+ + sta ,u+ + leay -1,y + bne cit.loop + clr >$FEED cold reboot + clr >$FFD8 go to low speed + jmp >$0000 jump to the reset code + +*================================================================== +* reboot the system +*================================================================== +ReBoot ldd #$3808 block $38, 8 times + ldx #$FFA0 where to put it +Lp sta 8,x put into map 1 + sta ,x+ and into map 0 + inca + decb count down + bne Lp + + lda #$4C standard DECB mapping + sta >$FF90 + clr >$FF91 go to map type 0 + clr >$FFDE and to all-ROM mode + ldd #$FFFF +* clrd executes as CLRA on a 6809 + fdb $104F + tstb is it a 6809? + bne Reset yup, skip ahead +* ldmd #$00 go to 6809 mode! + fcb $11,$3D,$00 +Reset jmp [$FFFE] do a reset +BtSize equ *-Reboot + +*================================================================== +* reload the OS9Boot file +*================================================================== +LoadIt lbsr Seek seek /DD to track 0 + orcc #IntMasks +LoadIt.0 clr >$FFA8 map in block 0 + ldu #$0520 somewhere unused + leax $0520 and jump to it + +ReLoad clr >$FF91 go to map type 0 + ldx #$ED00 where REL is located + +RLp leax 1,x to to the next byte (OS...) + ldd ,x + cmpd #M$ID12 + bne RLp if not the start of a module + ldd M$Exec,x get execution address of the module (REL) + jmp d,x and go to it +LoadSiz equ *-ReLoad + +*================================================================== +* print out the help message +*================================================================== +Help leax HMsg,pc + ldy #HLen +Print lda #1 to STDOUT + os9 I$Write +ClnExit clrb +Exit os9 F$Exit + +HMsg fcc /ReBoot: Reboots the system, or returns to DECB./ + fcb C$CR,C$LF + fcc / use: reboot [-b] [-r] [-k filename] [-l filename]/ + fcc / [-g filename]/ + fcb C$CR,C$LF + fcc / -b = return to DECB (default)/ + fcb C$CR,C$LF + fcc / ( equivalent to )/ + fcb C$CR,C$LF + fcc / -r = reload OS9Boot/ + fcb C$CR,C$LF + fcc / ( equivalent to pressing )/ + fcb C$CR,C$LF + fcc /** The previous 2 options are mutually exclusive to the/ + fcc / next 3.**/ + fcb C$CR,C$LF + fcc / -k [filename] = load in a new kernel track from [filename]/ + fcb C$CR,C$LF + fcc / -l [filename] = reload the OS9Boot file from [filename]/ + fcb C$CR,C$LF + fcc / -g [filename] = load in a new GrfDrv from [filename]/ + fcb C$CR,C$LF + fcc / If you reload GrfDrv, you MUST also reload the/ + fcc / OS9Boot file./ + fcb C$CR,C$LF +HLen equ *-HMsg + +DD fcs '/DD' + +*================================================================== +* Seek /DD to sector 0... why not? +*================================================================== +Seek leax fil.msg,pc + ldy #fil.len + lda #$02 to STDERR + os9 I$Write + +* A=$02 still... + leax ,u +fil.lp ldb ,u+ + cmpb #C$SPAC + bhi fil.lp + ldb #C$CR get a CR + stb -1,u save for later + + ldy #$0100 maximum amount of junk to write + os9 I$WritLn dump out the filename + puls b,cc restore error code, condition + os9 F$Exit and exit + +fil.msg fcc /ReBoot: Error reading file: / +fil.len equ *-fil.msg + + fcc 'MAGIC Boot Module is next!' + + emod +eom equ * + end diff -r 4f56e6891d94 -r 53553cdc265c level2/cmds/smap.asm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/cmds/smap.asm Fri Jan 31 17:49:58 2003 +0000 @@ -0,0 +1,196 @@ +******************************************************************** +* SMap - Show System Memory Map +* +* $Id$ +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ +* 1 Original version + + nam SMap + ttl Show System Memory Map + +* Disassembled 02/05/12 22:05:11 by Disasm v1.6 (C) 1988 by RML + + ifp1 + use defsfile + endc + +tylg set Prgrm+Objct +atrv set ReEnt+rev +rev set $01 +edition set 1 + + mod eom,name,tylg,atrv,start,size + +u0000 rmb 1 +u0001 rmb 3 +u0004 rmb 1 +u0005 rmb 1 +u0006 rmb 1 +u0007 rmb 1 +u0008 rmb 6 +u000E rmb 1 +u000F rmb 456 +size equ . + +name fcs /SMap/ + fcb edition + +H1 fcc " 0 1 2 3 4 5 6 7 8 9 A B C D E F" + fcb C$CR +H1L equ *-H1 +H2 fcc " # = = = = = = = = = = = = = = = =" + fcb C$CR +H2L equ *-H2 +L005A fcb $00,$00,$00,$00 + +start lbsr L0170 + leax >H1,pcr + lda #$01 + ldy #H1L + os9 I$WritLn + leax >H2,pcr + ldy #H2L + os9 I$Write + leax >L005A,pcr + tfr x,d + ldx #$004E + ldy #$0002 + pshs u + leau u000F,u + os9 F$CpyMem + puls u + lbcs L013F + ldx u000F,u + ldy #$0100 + pshs u + leau u000F,u + os9 F$CpyMem + puls u + lbcs L013F + clr FreePgs,pcr + ldy #FreePgsL + lda #$01 + os9 I$Write + ldb FreeRAM,pcr + ldy #FreeRAML + lda #$01 + os9 I$Write + ldb