mirror of
https://github.com/irmen/prog8.git
synced 2024-07-05 06:29:02 +00:00
emit extra nop for breakpoints so vice label list works again (requires 64tass 1.55.2257 or newer!)
This commit is contained in:
parent
8132edbb08
commit
5c9e0c9f51
@ -254,7 +254,6 @@ asmsub str2ubyte(str string @ AY) clobbers(Y) -> ubyte @A {
|
||||
; -- returns the unsigned byte value of the string number argument in AY
|
||||
; the number may NOT be preceded by a + sign and may NOT contain spaces
|
||||
; (any non-digit character will terminate the number string that is parsed)
|
||||
; TODO implement optimized custom version of this instead of simply reusing str2uword
|
||||
%asm {{
|
||||
jmp str2uword
|
||||
}}
|
||||
@ -264,7 +263,6 @@ asmsub str2byte(str string @ AY) clobbers(Y) -> ubyte @A {
|
||||
; -- returns the signed byte value of the string number argument in AY
|
||||
; the number may be preceded by a + or - sign but may NOT contain spaces
|
||||
; (any non-digit character will terminate the number string that is parsed)
|
||||
; TODO implement optimized custom version of this instead of simply reusing str2word
|
||||
%asm {{
|
||||
jmp str2word
|
||||
}}
|
||||
|
@ -1 +1 @@
|
||||
5.0
|
||||
5.1-SNAPSHOT
|
||||
|
@ -1131,7 +1131,9 @@ $counterVar .byte 0""")
|
||||
"%breakpoint" -> {
|
||||
val label = "_prog8_breakpoint_${breakpointLabels.size+1}"
|
||||
breakpointLabels.add(label)
|
||||
out("$label\tnop")
|
||||
out("""
|
||||
nop
|
||||
$label nop""")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -143,14 +143,17 @@ Required tools
|
||||
`64tass <https://sourceforge.net/projects/tass64/>`_ - cross assembler. Install this on your shell path.
|
||||
It's very easy to compile yourself.
|
||||
A recent precompiled .exe for Windows can be obtained from my `clone <https://github.com/irmen/64tass/releases>`_ of this project.
|
||||
*You need at least version 1.55.2257 of this assembler to correctly use the breakpoints feature.*
|
||||
It's possible to use older versions, but it is very likely that the automatic Vice breakpoints won't work with them.
|
||||
|
||||
A **Java runtime (jre or jdk), version 8 or newer** is required to run the prog8 compiler itself.
|
||||
If you're scared of Oracle's licensing terms, most Linux distributions ship OpenJDK instead.
|
||||
Fnd for Windows it's possible to get that as well. Check out `AdoptOpenJDK <https://adoptopenjdk.net/>`_ .
|
||||
If you're scared of Oracle's licensing terms, most Linux distributions ship OpenJDK in their packages repository instead.
|
||||
For Windows it's possible to get that as well; check out `AdoptOpenJDK <https://adoptopenjdk.net/>`_ .
|
||||
For MacOS you can use the Homebrew system to install a recent version of OpenJDK.
|
||||
|
||||
Finally: a **C-64 emulator** (or a real C-64 ofcourse) can be nice to test and run your programs on.
|
||||
The compiler assumes the presence of the `Vice emulator <http://vice-emu.sourceforge.net/>`_.
|
||||
If you're targeting the CommanderX16, there's the `x16emu <https://github.com/commanderx16/x16-emulator>`_.
|
||||
Finally: an **emulator** (or a real machine ofcourse) to test and run your programs on.
|
||||
In C64 mode, thhe compiler assumes the presence of the `Vice emulator <http://vice-emu.sourceforge.net/>`_.
|
||||
If you're targeting the CommanderX16 instead, there's the `x16emu <https://github.com/commanderx16/x16-emulator>`_.
|
||||
|
||||
.. important::
|
||||
**Building the compiler itself:** (*Only needed if you have not downloaded a pre-built 'fat-jar'*)
|
||||
|
@ -2,7 +2,7 @@
|
||||
TODO
|
||||
====
|
||||
|
||||
- 64tass doesn't output all labels anymore in the vice-mon-list, so %breakpoint labels are no longer present....
|
||||
- use assignment utility functions in asmgen/assignmentAsmgen instead of creating AsmAssignment instances everywhere
|
||||
- make it possible to use cpu opcodes such as 'nop' as variable names by prefixing all asm vars with something such as '_'
|
||||
- option to load the built-in library files from a directory instead of the embedded ones (for easier library development/debugging)
|
||||
- see if we can group some errors together for instance the (now single) errors about unidentified symbols
|
||||
|
@ -1,20 +1,11 @@
|
||||
%import textio
|
||||
%import floats
|
||||
%import syslib
|
||||
%zeropage basicsafe
|
||||
|
||||
main {
|
||||
|
||||
sub start() {
|
||||
|
||||
str s1 = "irmen"
|
||||
str s2 = "hello"
|
||||
|
||||
; byte c = strcmp(s1, s2)
|
||||
; txt.print_b(c)
|
||||
; txt.chrout('\n')
|
||||
txt.print_ub(s1<=s2)
|
||||
txt.chrout('\n')
|
||||
; TODO breakpoint label is no longer outputted by 64tass ...
|
||||
%breakpoint
|
||||
|
||||
testX()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user