maziac / DeZog

Visual Studio Code Debugger for Z80/ZX Spectrum.
MIT License
210 stars 34 forks source link

topOfStack by label "Cannot evaluate" error #75

Closed deadman2000 closed 2 years ago

deadman2000 commented 2 years ago

Test.z80:

                DEVICE ZXSPECTRUM128

Code_Start:     EQU 0x8000

                ORG Code_Start
                LD SP, Stack_Top
                LD A, %00000110
                OUT 254, A

Loop:           HALT
                JR Loop

Code_Length:    EQU $-Code_Start+1

                SAVESNA "test.sna", Code_Start

Stack_Bottom:   ; 100 bytes of stack
    defs    100, 0
Stack_Top:

launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Z80 Debugger",
            "type": "dezog",
            "request": "launch",
            "remoteType": "zrcp",
            "zrcp": {
                "hostname": "localhost",
                "port": 10000
            },
            "topOfStack": "Stack_Top",
            "rootFolder": "${fileDirname}",
            "disassemblerArgs": {
                "esxdosRst": true
            },
            "load": "${fileDirname}/${fileBasenameNoExtension}.sna",
            "skipInterrupt": false,
            "startAutomatically": true,
            "preLaunchTask": "sjasmplus"
        }
    ]
}

Message: изображение

I trying with 'Stack_Top: EQU 0xFFF0'. Same effect

DeZog v2.4.3 SjASMPlus Z80 Cross-Assembler v1.18.3

maziac commented 2 years ago

There is no *.sld file set i your launch.json.

DeZog needs to know the values of the labels from somewhere. That is the sld file.

E.g. see in the z80-sample-project.

You need to assemble with sjasmplus with additional argument '--sld=\.sld'. And in the launch.json you need something like:

            "sjasmplus": [
                {
                    "path": "<yourfilename>.sld"
                }
            ],
deadman2000 commented 2 years ago

@maziac yep. After changing lst format to sld and adding sjasmplus it works now. Thanx!