home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1994 November
/
1994-11b.d64
/
supermon+64.doc
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
7KB
|
229 lines
5 print"[147][144]
10 [143] supermon+ instr
20 [141] 10000
30 [153] "supermon+ is a new version of
40 print"'supermon' the reason for the new
50 [153]"version is to provide identical
55 print"commands to those of the built-in
60 [153]"monitor of the commodore 128.
65 print" the most visible changes from
70 [153]"earlier versions of supermon are:
75 print" --decimal or binary input allowed;
80 [153]" --disk status and commands (@);
85 print" --looser (easier) syntax.
100 [141] 9000
110 [153]" number conversion "
120 [153]" $2000
130 print" $2000
140 [153]" +8192
150 print" &20000
160 [153]" %10000000000000
170 print
180 print" in the above example the user
190 [153]"has asked for the numeric equivalents
200 print"to hexadecimal 2000. the reply shows
210 [153]"the value in hex ($), in decimal (+),
220 print"in octal (&), and in binary (%).
230 [153]" the user could ask for a number to
240 print"be converted from any of these bases
250 [153]"by giving the appropriate prefix.
300 gosub9000
310 print" important note -- "
320 print" at any time in the following text,
330 [153]"you may enter any number in any base
340 print"and conversion will be done for you.
350 [153]"example:
360 print" m +4096
370 [153]" ... will cause a memory display
380 print"from decimal address 4096. in the
390 [153]"display, the hex address ($1000) will
400 print"be shown. similarly,
410 [153]" a +2048 ldaclose#%10000000
420 print" ... will be converted to assemble:
430 [153]" a $0400 lda #$80
440 print" if you don't give a prefix, the
450 [153]"monitor will assume hexadecimal.
500 gosub9000
510 print" register display "
520 print" r
530 [153]" pc sr ac xr yr sp
540 print"; 0000 01 02 03 04 05
550 [153]" displays the register values saved
560 print"when supermon+[146] was entered. values
570 [153]"may be changed by typing over the
580 print"display followed by a return character.
590 [153]" pc - program counter
600 print" sr - status register
610 [153]" ac, xr, yr - a, x, and y registers
620 print" sp - stack pointer
700 [141]9000
720 [153]" mwait 200wait 209
730 print">0200 4d 20 32 30 30 20 32 30:m 200 20"
740 print">0208 39 00 00 04 00 04 00 04:9......."
750 print" display memory from 0200 hex to
760 [153]"0209 hex. display is in lines of 8
770 print"so addresses $200 to $20f are shown.
780 [153]" if one address only is given then
790 print"12 lines (96 locations) will be shown.
800 [153]"if no address is given display will go
810 print"from the last address.
820 [153]" equivalent ascii characters are shown
830 print"in reverse at the right.
840 [153]"values are changed by typing over the
850 print"display followed by a return character.
900 [141]9000
910 [153]" exit to basic "
920 [153]" x
930 print" return to basic ready[146] mode.
940 [153]"when you wish to return to supermon+,
950 print"command sys 8[146].
1000 [141]9000
1010 [153]" simple assembler "
1020 [153]" await 2000wait ldawait #+18
1030 print" (changes to:)"
1040 print"a 2000 a9 12 lda #$12
1050 [153]"a 2002 ..next instruction
1060 print" in the above example the user
1070 [153]"started assembly at 2000 hex. the
1080 print"first instruction was load a register
1090 [153]"with immediate 18 decimal. in following
1100 print"lines the user need not type the
1110 [153]"a and address. the simple assembler
1120 print"prompts with the next address. to exit
1130 [153]"the assembler type a return after the
1140 print"the address prompt.
1150 [153]" previous lines may be changed by
1160 print"typing over the right hand part.
1200 [141]9000
1220 [153]" dwait 2000wait 2004wait
1230 print". 2000 a9 12 lda #$12
1240 [153]". 2002 9d 00 80 sta $8000,x
1250 print" disassembles instructions from
1260 [153]"2000 to 2004 hex. if one address is
1270 print"given, 20 bytes will be disassembled.
1280 [153]"if no address, start from the last
1290 print"used address.
1300 [153]" code may be reassembled by moving
1310 print"the cursor back and typing over the
1320 [153]"right hand part.
1400 gosub9000
1410 print" fill memory "
1420 print" f[146] 1000[146] 1100[146] ff
1430 [153]" fills the memory from 1000 hex to
1440 print"1100 hex with the byte ff hex.
1500 [141]9000
1510 [153]" go (run)"
1520 [153]" gwait 1000
1530 print" go to address 1000 hex and begin
1540 [153]"running code.
1550 print" if no address is given, the address
1560 [153]"from the <pc> register is used.
1570 print" jump (subroutine)"
1580 print" j[146] 1000
1590 [153]" call address 1000 hex and begin
1600 print"running code. return to the monitor.
1700 [141]9000
2200 [153]" hunt memory "
2210 [153]" hwait c000wait d000wait 'read
2220 print" hunt thru memory from c000 hex to
2230 [153]"d000 hex for the ascii string readwait and
2240 print"print the address where it is found. a
2250 [153]"maximum of 32 characters may be used.
2260 print" h[146] c000[146] d000[146] 20[146] d2[146] ff
2270 [153]" hunt memory from c000 hex to d000
2280 print"hex for the sequence of bytes 20 d2 ff
2290 [153]"and print the address. a maximum of 32
2300 print"bytes may be used.
2390 [141]9000
2400 [153]" load "
2401 [153]" lwait
2402 print" load any program from cassette #1.
2403 [153]" lwait ";[199](34);"ram test";[199](34)
2404 [153]" load from cassette #1 the program
2405 print"named ram test[146].
2410 [153]" lwait ";[199](34);"ram test";[199](34);",08wait
2420 print" load from disk (device 8) the program
2430 [153]"named ram testwait.
2440 print"this command leaves basic pointers
2450 [153]"unchanged.
2490 gosub9000
2700 print" save"
2710 print" s[146] ";chr$(34);"program name";chr$(34);",01,0800,0c80"
2720 print" save to cassette #1 memory from
2730 [153]"0800 hex up to but not including 0c80
2740 print"hex and name it program name[146].
2750 [153]" swait ";[199](34);"0:program name";[199](34);",08,1200,1f50"
2760 [153]" save to disk drive #0 memory from
2770 print"1200 hex up to but not including 1f50
2780 [153]"hex and name it program namewait.
2790 gosub9000
2800 print" transfer memory "
2810 print" t[146] 1000[146] 1100[146] 5000
2820 [153]" transfer memory in the range 1000
2830 print"hex to 1100 hex and start storing it at
2840 [153]"address 5000 hex.
2890 gosub9000
2900 print" compare memory "
2910 print" c[146] 1000[146] 1100[146] 5000
2920 [153]" compare memory in the range 1000
2930 print"hex to 1100 hex with memory starting
2940 [153]"at address 5000 hex.
2990 gosub9000
3000 print" check disk "
3010 print" @[146]
3020 [153]" get disk status message
3030 print" @9[146]
3040 [153]" get disk unit 9 status message
3050 print" @,$0[146]
3060 [153]" get drive 0 directory
3070 print" @,s0:temp[146]
3080 [153]" scratch file 'temp' from disk
3090 gosub9000
3100 print" output to printer"
3110 print"call supermon+ from basic with:
3120 [153]" open 4,4:cmd 4:sys 8wait"
3130 [153]"all commands will go the printer.
3140 print" when complete, return to basic
3150 [153]"with xwait and command:
3160 print" print#4:close 4[146]"
3170 gosub9000
3500 print"[145] summary "
3505 print"$[146],+[146],&[146],%[146] number conversion
3510 [153]"gwait go (run)
3515 print"j[146] jump (subroutine)
3520 [153]"lwait load from tape or disk
3530 print"m[146] memory display
3540 [153]"rwait register display
3550 print"s[146] save to tape or disk
3560 [153]"xwait exit to basic
3600 print"a[146] simple assembler
3610 [153]"dwait disassembler
3620 print"f[146] fill memory
3630 [153]"hwait hunt memory
3660 print"t[146] transfer memory
3665 [153]"cwait compare memory
3670 print"@[146] disk status/command
4000 [141]9000
4010 [153]"onsupermonwait will load itself into the
4020 print"top of memory .. wherever that happens
4030 [153]"to be on your machine.
4060 print"be sure to note the sys command which
4070 [153]"links supermonwait to the commodore. it
4080 print"may be used to reconnect the monitor
4090 [153]"if it