Author Topic: Monitor / Debugger  (Read 612 times)

0 Members and 1 Guest are viewing this topic.

Offline Fabrizio Radica

  • Supporter
  • CPC664
  • *
  • Posts: 135
  • Country: it
  • Amiga and CPC6128 User
    • Retroacademy
  • Liked: 128
  • Likes Given: 122
Monitor / Debugger
« on: 19:38, 28 June 19 »
Hi,
Is exist any (software or rom) Monitor/Debugger for CPC?
I'm interested in a Real Monitor/Debugger when i'm going to RetroEvents :)
Thanks
Ciao!
I'm working on this.. but i don't know to transform it in a RSX command :(
Code: [Select]
10 cls:mode 2:str%=0:maxscan%=255
50 input "Memory Address: ",a$
55 cls #2:cls #3:window #2,1,40,1,15:window #3,41,80,1,15
100 for n=0 to maxscan%
110 add=peek(val("&"+a$)+n):print #2,hex$(add)+" ";
220 if add<>0 then print #3,chr$(add)+" "; else print #3,". ";
300 next n
350 locate 1,16
Amstrad CPC6128 <3
http://www.facebook.com/groups/retroacademy/
Retroacademy.it - retrocomputing, retrogame anni &#039;70, &#039;80, &#039;90
Retroacademy.it - retrocomputing, retrogame anni '70, '80, '90

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.351
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1099
  • Likes Given: 2645
Re: Monitor / Debugger
« Reply #1 on: 19:55, 28 June 19 »
Hi,
Is exist any (software or rom) Monitor/Debugger for CPC?
- Use the Maxam ROM, it provides lot's of features.
- Use the M4 card for WiFi enhanced interrupt / debugging.
- Use the Porting System of FutureOS to play with I/O ports.

Oh and for BASIC I guess the JavaCPC emulator provides some cool tools for that.


To make an RSX you first need an assembler program, then you can use it to create an RSX command.
Look at my LambdaSpeak DSK (see signature) to see how RSX's are implemented.
« Last Edit: 19:58, 28 June 19 by GUNHED »
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.03.01)

Offline SRS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 628
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 627
  • Likes Given: 366
Re: Monitor / Debugger
« Reply #2 on: 22:33, 30 June 19 »
As Gunhed says lots of tools on ROM.
Here's a little BASIC one for you:
Code: [Select]
100 REM Amstrad Monitor
110 REM (C)
120 REM By Kevin Edwards
130 ON ERROR GOTO 1180
140 MODE 1
150 PRINT"***  Amstrad monitor v1.0  ***"
160 PRINT:PRINT"By Kevin Edwards"
170 POKE &5000,&CD:POKE &5001,0:POKE &5002,&B9
180 POKE &5003,&CD:POKE &5004,6:POKE &5005,&B9
190 POKE &5006,&3A
200 POKE &5009,&32:POKE &500A,&D:POKE &500B,&50
210 POKE &500C,&C9
220 PRINT:PRINT:PRINT"-- Commands --":PRINT
230 PRINT"<D>ump memory"
240 PRINT"<E>dit memory"
250 PRINT"<J>ump to subroutine"
260 PRINT"<L>eave monitor"
270 PRINT"<P>rint memory as characters"
280 PRINT:PRINT:PRINT"Enter command ...";
290 a$=INKEY$:IF a$="" THEN 290
300 a$=UPPER$(a$):PRINT A$:PRINT
310 IF INSTR("DEJLP",A$) THEN ON INSTR("DEJLP",A$) GOSUB 490,750,980,330,1070 ELSE PRINT"Invalid selection !!":GOTO 220
320 GOTO 280
330 END
340 REM SELECT START ADDRESS
350 PRINT:PRINT:PRINT"1...ROM &0000-&3FFF, 0-16383      (O.S)"
360 PRINT"  & RAM &4000-&BFFF, 16384-49151"
370 PRINT"  & ROM &C000-&FFFF, 49152-65535  BASIC":PRINT
380 PRINT"2...RAM &0000-&FFFF, 0-65535"
390 PRINT:PRINT"Enter memory type, 1 or 2 ";
400 a$=INKEY$:IF a$="" OR (a$<>"1" AND a$<>"2") THEN 400
410 IF VAL(a$)=1 THEN rom=1 ELSE rom=0
420 PRINT a$
430 PRINT:PRINT
440 INPUT"Enter start location ",start
450 IF START>65535 THEN PRINT:PRINT"Enter a number between 0 and 65535 !!":PRINT:SOUND 1,200:GOTO 440
460 PRINT:base=start
470 IF base<0 THEN base=base+65536
480 RETURN
490 GOSUB 340
500 ZONE 5:PRINT HEX$(base),
510 FOR offset=0 TO 7
520 ZONE 3
530 location=base+offset
540 GOSUB 680
550 PRINT,HEX$(byte);
560 NEXT
570 PRINT,
580 FOR offset2=0 TO 7
590 location=base+offset2
600 GOSUB 680
610 IF byte>31 THEN PRINT CHR$(byte); ELSE PRINT CHR$(46);
620 NEXT
630 IF INKEY$<>"" THEN RETURN
640 base=base+8
650 IF base>65535 THEN RETURN
660 PRINT
670 GOTO 500
680 REM get byte from memory
690 IF rom=0 AND LOCATION<65536 THEN byte=PEEK(location):RETURN
700 POKE &5007,((location/256)-INT(location/256)) *256
710 POKE &5008,INT(location/256)AND &FF
720 CALL &5000
730 byte=PEEK(&500D)
740 RETURN
750 REM EDIT
760 PRINT:PRINT"1...Edit memory byte by byte"
770 PRINT"2...Enter a string into memory"
780 PRINT:PRINT"Enter type of editing, 1 or 2  ";
790 type$=INKEY$:IF type$="" OR (type$<>"1" AND type$<>"2") THEN 790
800 PRINT type$:PRINT:GOSUB 430
810 IF type$="2" THEN 900
820 ZONE 6
830 PRINT"&";HEX$(base),"&";HEX$(PEEK(base)),base;"  ";PEEK(base),
840 INPUT newbyte$
850 IF newbyte$="" THEN PRINT:PRINT"End of editing":RETURN
860 POKE base,VAL(newbyte$)
870 base=base+1
880 IF base>65535 THEN base=0
890 GOTO 830
900 PRINT:PRINT"Enter string to be placed in memory"
910 INPUT".....>",a$
920 IF a$="" THEN PRINT:PRINT"Aborted....!":RETURN
930 IF base+LEN(a$)-1>65535 THEN PRINT:PRINT"String over end of memory":RETURN
940 FOR loop=1 TO LEN(a$)
950 POKE base+loop-1,ASC(MID$(a$,loop,1))
960 NEXT
970 PRINT:PRINT"Function complete...":RETURN
980 REM jump to subroutine
990 PRINT
1000 GOSUB 430
1010 PRINT:PRINT"Are you sure you wish to continue Y/N ";
1020 a$=INKEY$:a$=UPPER$(a$):IF a$="" OR (a$<>"Y" AND a$<>"N") THEN 1020
1030 PRINT a$:IF a$="N" THEN RETURN
1040 CALL base
1050 PRINT:PRINT:PRINT"Returned from subroutine  ...!"
1060 RETURN
1070 REM print string
1080 GOSUB 340
1090 ZONE 5:PRINT HEX$(base),
1100 FOR offset=0 TO 31
1110 location=base+offset
1120 GOSUB 680
1130 IF byte>31 THEN PRINT CHR$(byte); ELSE PRINT CHR$(46);
1140 NEXT
1150 IF INKEY$<>"" THEN RETURN
1160 base=base+32:IF base>65535 THEN RETURN
1170 PRINT:GOTO 1090
1180 SOUND 1,150:SOUND 2,100
1190 PRINT:PRINT:PRINT"ERROR, number = ";ERR;" at line ";ERL
1200 END