pressA ;&&trashes a,x,y,Pointer1,Pointer1+1,Pointer2,Pointer2+1 ;&&modifies CursorX lda CursorX beq KeyboardRoutine._exitPLA clc adc #24 tay jsr restoreVerticalDigitsBar ;&&preserve y dey jsr setVerticalDigitsBarToCurrent dec CursorX rts
64tass -a -B $< -o $@ -L $@.dasm --vice-labels -l $@.l sed -i 's/^al \([^ ]*\) .*breakpoint/break \1/' $@.l x64 -moncommands $@.l -autostartprgmode 1 -autostart-warp +truedrive +cart $@
... al 9c7 .xp1 break 80e al 956 .a1 ...
getchar: ldy #$00 lda (zp), y ASSERT(A < $80) rts
64tass.exe -a SOURCEFILE -o OUTFILE --no-caret-diag --dump-labels -l SOURCENAME.tass -D BDD=0 -D CRT=0 -L SOURCENAME.list --verbose-list cscript D:\pathstuff\dumpToVice.vbs SOURCENAME.tass SOURCENAME.vice D:\emulation\WinVICE-2.4-x86\x64 -autostart SOURCENAME.prg +confirmexit -reu -reusize 128 -moncommands SOURCENAME.vice
set args = WScript.Arguments num = args.Count Dim objFS, objFile Set objFS = CreateObject("Scripting.FileSystemObject") Set objFile = objFS.CreateTextFile(args.Item(1),True) Set inFile = objFS.OpenTextFile(args.Item(0)) ' D:\GitHub\Qwack64\qwak.asm:1627:1: CollisionBoxesW = $1067 Do While Not inFile.AtEndOfStream blah = inFile.ReadLine() tokens = Split(blah,":") 'tokens(0) = D 'tokens(1) = file 'tokens(2) = line 'tokens(3) = char 'tokens(4) = Thing = X If( InStr(tokens(1), "structs") = 0 ) Then If( InStr(tokens(0), "command line") = 0 ) Then If( InStr(blah, ":=" ) = 0 ) Then label = LTrim(tokens(4)) If( Left(label,1) = "k" ) Then 'WScript.Echo label secondChar = Mid(label,2,1) If( LCase(secondChar) = secondChar ) Then writeLine(label) End IF Else writeLine(label) End If 'If( InStr(tokens(4), "=") > 0 ) then objFile.WriteLine (blah & "; dummy") End If End If Else label = LTrim(tokens(4)) If( Left(label,1) = "s" ) Then 'WScript.Echo label secondChar = Mid(label,2,1) If( LCase(secondChar) = secondChar ) Then writeLine(label) End IF Else writeLine(label) End If End If Loop Sub writeLine(label) parts = Split(label,"=") name = Replace(Trim(parts(0)),".","_") addr = Trim(parts(1)) If (InStr(addr,"$") = 0 ) Then addr = "$"+Hex(addr) End If objFile.WriteLine("al "+addr+" ."+name) End Sub
convert2PuzzleRowsTo4_4 ;&&trashes a,x,y,ZPTemp1,ZPTemp2,ZPTemp3,ZPTemp4,ZPTemp5,Pointer3 #STAB ZPTemp6,ZPTemp4 _4lineLoop #STAB ZPTemp7,ZPTemp3 _wordLoop ldy #3 lda PuzzleBuffer,x sta ZPTemp5 _byteLoop
sGameData .struct lives .byte ? score .byte ?,?,?,?,?,? high .byte ?,?,?,?,?,? currLevel .byte ? .ends GameData dStruct sGameData;
PAT .macro .byte $02 .endm PXT .macro .byte $12 .endm PYT .macro .byte $22 .endm TTA .macro .byte $32 .endm TTX .macro .byte $42 .endm TTY .macro .byte $52 .endm INR .macro .byte $62 .endm
set args = WScript.Arguments num = args.Count Dim objFS, objFile Set objFS = CreateObject("Scripting.FileSystemObject") Set objFile = objFS.CreateTextFile(args.Item(1),True) Set inFile = objFS.OpenTextFile(args.Item(0)) ' D:\GitHub\Qwack64\qwak.asm:1627:1: CollisionBoxesW = $1067 Do While Not inFile.AtEndOfStream blah = inFile.ReadLine() tokens = Split(blah,":") 'tokens(0) = D 'tokens(1) = file 'tokens(2) = line 'tokens(3) = char 'tokens(4) = Thing = X If( InStr(tokens(1), "structs") = 0 ) Then If( InStr(tokens(0), "command line") = 0 ) Then If( InStr(blah, ":=" ) = 0 ) Then label = LTrim(tokens(4)) If( Left(label,1) = "k" ) Then 'WScript.Echo label secondChar = Mid(label,2,1) If( LCase(secondChar) = secondChar ) Then writeLine(label) End IF Else writeLine(label) End If 'If( InStr(tokens(4), "=") > 0 ) then objFile.WriteLine (blah & "; dummy") End If End If Else label = LTrim(tokens(4)) If( Left(label,1) = "s" ) Then 'WScript.Echo label secondChar = Mid(label,2,1) If( LCase(secondChar) = secondChar ) Then writeLine(label) End IF Else writeLine(label) End If End If Loop Sub writeLine(label) parts = Split(label,"=") name = Replace(Trim(parts(0)),".","_") addr = Trim(parts(1)) If (InStr(addr,"$") = 0 ) Then addr = "$"+Hex(addr) End If objFile.WriteLine(name + "="+addr+"; dummy") End Sub
For getting 64tass labels loaded into vice. You can use the --vicelables option but this only gets you the global and none of the locals which makes debugging functions harder. Also you don't get the members of structs just the first one.
The assembler (or preprocessor) would generate a breakpoint at the ASSERT line and a corresponding breakpoint handler which is evaluated by the emulator each time the breakpoint is hit, but only stops execution when the assertion fails.
help cond Syntax: condition <checknum> if <cond_expr> Abbreviation: cond Each time the specified checkpoint is examined, the condition is evaluated. If it evalutes to true, the checkpoint is activated. Otherwise, it is ignored. If registers are specified in the expression, the values used are those at the time the checkpoint is examined, not when the condition is set. The condition can use registers (A, X, Y, PC, SP, FL and other cpu specific registers (see manual)) and compare them (==, !=, <, >, <=, >=) against other registers or constants. Registers can be the registers of other devices; this is denoted by a memspace prefix (i.e., c:, 8:, 9:, 10:, 11: Examples: A == 0, X == Y, 8:X == X)
help cond Syntax: condition <checknum> if <cond_expr> Abbreviation: cond ... Just saying...
help cond Syntax: condition <checknum> if <cond_expr> Abbreviation: cond ...