fix launching of Vice

This commit is contained in:
Irmen de Jong 2018-11-25 01:17:39 +01:00
parent 849bfde515
commit d1b750ea55
3 changed files with 55 additions and 3 deletions

View File

@ -0,0 +1,26 @@
%import c64lib
%import c64utils
~ main {
sub start() {
; set screen colors and activate lowercase charset
c64.EXTCOL = 5
c64.BGCOL0 = 0
c64.COLOR = 1
c64.VMCSB = %10111
; use kernel routine to write text (sorry, loops don't work in asm yet)
c64.CHROUT('H')
c64.CHROUT('e')
c64.CHROUT('l')
c64.CHROUT('l')
c64.CHROUT('o')
c64.CHROUT('!')
c64.CHROUT('\n')
return
}
}

View File

@ -13,8 +13,10 @@ sub start() {
uword address
memory uword memaddr = $c000
uword[2] wordarray
ubyte[2] ubytearray
byte b1
memory byte mb1 = $c991
memory ubyte mub1 = $c992
str stringvar = "??????????\n\n\nnext line\r\r\rnext line after carriagereturn"
@ -70,8 +72,31 @@ sub start() {
; Y = c64.CHRIN() ; ok!
; v1 = c64.CHRIN() ; ok !
c64.CHROUT(X)
c64.CHROUT(b1) ; @todo fix compiler crash expression identifierref should be a vardef, not null
c64.CHROUT(char1) ; @todo fix compiler crash "
c64.CHROUT(mb1) ; @todo fix compiler crash "
c64.CHROUT(mub1) ; @todo fix compiler crash "
c64.CHROUT(ubytearray[1]) ; @todo fix compiler crash null cannot be cast to non-null type prog8.ast.VarDecl
c64.CHROUT(ubytearray[X]) ; @todo fix compiler crash "
c64.CHROUT(wordarray[1]) ; @todo fix compiler crash "
testsub(X) ; @todo fix compiler crash
testsub(b1) ; @todo fix compiler crash
testsub(char1) ; @todo fix compiler crash
testsub(mb1) ; @todo fix compiler crash
testsub(mub1) ; @todo fix compiler crash
testsub(ubytearray[1]) ; @todo fix compiler crash
testsub(ubytearray[X]) ; @todo fix compiler crash
testsub(wordarray[1]) ; @todo fix compiler crash
return
}
sub testsub(arg: ubyte) {
return
}
}

View File

@ -36,6 +36,7 @@ fun main(args: Array<String>) {
val startTime = System.currentTimeMillis()
val filepath = Paths.get(moduleFile).normalize()
val programname: String
try {
// import main module and process additional imports
@ -125,6 +126,7 @@ fun main(args: Array<String>) {
val assembly = AsmGen(compilerOptions, intermediate, heap).compileToAssembly()
assembly.assemble(compilerOptions)
programname = assembly.name
val endTime = System.currentTimeMillis()
println("\nTotal compilation+assemble time: ${(endTime-startTime)/1000.0} sec.")
@ -137,10 +139,9 @@ fun main(args: Array<String>) {
if(startEmu) {
println("\nStarting C64 emulator...")
val program = "foo"
val monitorfile = "foo.mon_list"
val monitorfile = "$programname.mon_list"
val cmdline = listOf("x64", "-moncommands", monitorfile,
"-autostartprgmode", "1", "-autostart-warp", "-autostart", program)
"-autostartprgmode", "1", "-autostart-warp", "-autostart", programname+".prg")
ProcessBuilder(cmdline).inheritIO().start()
}
}