Debug your MSX with VSCode

Страница 3/7
1 | 2 | | 4 | 5 | 6 | 7

By S0urceror

Master (194)

Аватар пользователя S0urceror

17-07-2020, 23:26

Briqunullus wrote:

Which step did I miss?

Have you installed the Dezog package? I put the instructions in an earlier post.

By Briqunullus

Champion (429)

Аватар пользователя Briqunullus

18-07-2020, 09:10

Haha, good thinking. But yes, I downloaded the version from the link you provided and installed it manually. It shows up under extensions.

By Giangiacomo Zaffini 2

Master (254)

Аватар пользователя Giangiacomo Zaffini 2

18-07-2020, 09:32

I'm old and slow, but I use pasmo, zasm, sdcc(its assembler comes from ASxxxx), beyond I want to start something on Glass and zma, which Is HRA! new iteration of macro assembler.
As far as assembler support feature request goes, that's it. :P
Note - GNU binutils (gas, ld, readelf and stuff) officially supports/target Z80, so I would like to see some love for that too.

By Grauw

Ascended (10180)

Аватар пользователя Grauw

18-07-2020, 12:58

Thom wrote:
S0urceror wrote:

For other assemblers that generate list files with line numbers, addresses, labels, it supports regular expressions to extract the necessary information to make the debugger run.

Which assembler would you like to use? Maybe we can adapt it to support this as well.

Glass, but I don't know if it generates list files.

Can you give an example of what kind of output you would expect from Glass?

Giangiacomo Zaffini 2 wrote:

Note - GNU binutils (gas, ld, readelf and stuff) officially supports/target Z80

Nice, since February this year Smile.

By Thom

Paladin (685)

Аватар пользователя Thom

18-07-2020, 14:10

Grauw wrote:
Thom wrote:
S0urceror wrote:

For other assemblers that generate list files with line numbers, addresses, labels, it supports regular expressions to extract the necessary information to make the debugger run.

Which assembler would you like to use? Maybe we can adapt it to support this as well.

Glass, but I don't know if it generates list files.

Can you give an example of what kind of output you would expect from Glass?

Are you asking me or S0urceror? I don't know the answer, as I only use Glass to compile asm source code.

By Grauw

Ascended (10180)

Аватар пользователя Grauw

18-07-2020, 15:29

Asking S0urceror since he knows best what Dezog needs to function.

By S0urceror

Master (194)

Аватар пользователя S0urceror

19-07-2020, 14:49

Grauw wrote:

Can you give an example of what kind of output you would expect from Glass

The output has to look like this:

# file opened: main.asm
 1    0000              ; MSX-DOS function codes
 2    0000              _STROUT equ 09h
 3    0000              _CONOUT equ 02h
 4    0000              ; MSX-DOS entry point
 5    0000              BDOS equ 0005h
 6    0000
 7    0000              ; Our program!
 8    0000                  org 0100h
 9    0100 11 1D 01         ld de, TXT_HELLO1
10    0103 0E 09            ld c, _STROUT
11    0105 CD 05 00         call BDOS
12    0108 21 28 01         ld hl, TXT_HELLO2
13    010B CD 0F 01         call PRINT
14    010E C9               ret
15    010F
16    010F              ; PRINT a zero-terminated string in MSX-DOS
17    010F              ; INPUT: HL points to start of string
18    010F              PRINT:
19    010F 7E               ld a, (hl)
20    0110 A7               and a
21    0111 C8               ret z
22    0112                  ;
23    0112 E5               push hl
24    0113 5F               ld e, a
25    0114 0E 02            ld c, _CONOUT
26    0116 CD 05 00         call BDOS
27    0119 E1               pop hl
28    011A                  ;
29    011A 23               inc hl
30    011B 18 F2            jr PRINT
31    011D
32    011D 48 65 6C 6C  TXT_HELLO1 DB "Hello MSX!$"
32    0121 6F 20 4D 53
32    0125 58 21 24
33    0128 0D 0A 44 65  TXT_HELLO2 DB "\r\nDebugging with Dezog",0
33    012C 62 75 67 67
33    0130 69 6E 67 20
33    0134 77 69 74 68
33    0138 20 44 65 7A
33    013C 6F 67 00
34    013F
# file closed: main.asm

Important things to take into account:

  • filename should be listed in start/close lines starting with #
  • then the format: [line number] [address] [bytes] [label] [assembly]

I guess only the line number, address and labels are important. In the launch.json you can specify which input filter to use so as long as I can extract it with some RegEx we're good.

P.S. This listing is from some sample code that is part of the video I just put up on Youtube. There you'll find a lot more information.

By S0urceror

Master (194)

Аватар пользователя S0urceror

19-07-2020, 14:38

Dezog+OpenMSX on Youtube.

For everyone who is interested on how to set up your build environment with Dezog+OpenMSX, I have put up a new video on Youtube. You'll find it here. I think this will answer a lot of questions that were posted on the forum.

The latest version of Dezog that now also supports conditional breakpoints can be found here.
And the sample code shown in the video is here if you want to play around with it yourselves.

By Grauw

Ascended (10180)

Аватар пользователя Grauw

19-07-2020, 14:40

Thanks! And nice, I’ll go and watch it!

By S0urceror

Master (194)

Аватар пользователя S0urceror

19-07-2020, 14:50

You're fast, the video is still being processed to HD on Youtube, will be done in 15 mins.

Страница 3/7
1 | 2 | | 4 | 5 | 6 | 7