Git Product home page Git Product logo

c64jasm's People

Contributors

andrewmshowe avatar leyyinad avatar nurpax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

c64jasm's Issues

setting a breakpoint when prg is running should continue after setting the brkpt

When the program is running and you set a breakpoint, VICE remotemon pauses the app (at whereever it happened to be running when break was set). Once you continue with 'c' or 'g' from this point, the actual breakpoint will be hit.

It'd be better if setting a breakpoint wouldn't immediately pause but rather it'd continue and then let VICE break on actual breakpoints.

Maybe should change MonitorConnection API from setBreakpoint to setBreakpoints which'd also delete earlier breakpoints and reset the whole array and then resume execution.

nested arrays don't compile

!for frame in xyzzy {
!for x in range(8) {
!let fi = frame[i]
; !byte frame[i].x & 255
}
}

where xyzzy is something like

xyzzy = [[{x:0,y:0}]]

memoize plugin calls

plugins now get called once per pass. for any type of larger input file processing, this might be pretty bad for perf. could just memoize the plugin results based on input args.

duplicate symbol errors missing

search for this.variables.add, many of these are not guarded by check for existing variables of the same name.

add a bindVariable() that checks for this and use that instead.

weird error message

copy_screen_top_half: {
    copyscreen(screen0, screen1, 0, 12)
    rts
}

this should error about +copyscreen (e.g., macro call is wrong) but instead if complains about

{
	"resource": "/Users/janne/dev/c64-palju/main.asm",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "undefined",
	"severity": 8,
	"message": "Syntax error: Expected \"x\" but \"s\" found.",
	"source": "c64jasm",
	"startLineNumber": 94,
	"startColumn": 25,
	"endLineNumber": 94,
	"endColumn": 26
}```

file scope

some mechanism to wrap a whole included file inside a scope. this scope should be accessible from outer scopes with

filescope.label

parser bug in member

This doesn't compile, errors out with a syntax error:

    !let numSprites = s.numSprites
    !byte s.numFrames * s.numSprites * 2

This can be worked around with:

    !let numSprites = s.numSprites
    !byte s.numFrames * numSprites  ; * s.numSprites * 2

.local labels

Local labels can be specified with a .dot prefix. Every new normal label defines a new local scope:

foo:
  lda #0
.bar:

bar:
  ldx #1
.baz:

These get resolved to foo, foo.bar, bar, bar.baz.

The .prefix syntax is especially helpful when used in macro declarations.

nested namespaces

would support #20 too.

some problems in current scoping:

foo: {
bar:
}

lda foo.bar

the dot operator resolution in the assembler is sort of complicated since it can be either an object reference or a sort of undefined scope resolve.

perhaps nested access should instead be done by :: like in C++. e.g.,

lda foo::bar

to make it explicit and simplify symbol resolution.

macro expanded labels should also be accessible. KA does it like this, this seems good:

        *=$1000
start:  inc c1.color
        dec c2.color
c1:     :setColor()
c2:     :setColor()
        jmp start

KA also supports for-loop labels and if-labels:

       jmp myIf.label

myIf: .if (true) {
         ...
label:   lda #0  // <-- Jumps here
         ...
      } else {
         ...
label:   nop
         ...
}

similarly, for-loop labels can be accessed similarly (in c64jasm syntax):

foo: !for i in range(4) {
lbl: 
}
lda foo[0].lbl

optionally output disassembly

c64jasm --disassembly

should generated a listing file with machine code.

this should be plugged into the assembler so that it can tell apart actual machine instructions from byte data.

if/elif/else

Add elif blocks

something like this (from shell pegjs):

ifBlock "an if/elif/else statement"
 = "if" spaceNL+ test:condition
   "then" spaceNL+ body:script
   elifBlocks:elifBlock*
   elseBody:("else" script)?
   "fi"

elifBlock
 = "elif" spaceNL+ test:condition "then" spaceNL+ body:script

something funky going on with nested macros

!macro copychars(dstptr, srcchar, srccol) {
    !macro r(i) {
        lda (srcchar),y
        sta dstptr + i*40 + 39
        lda (srccol),y
        sta $d800 + i*40 + 39
        +add16_imm8(srcchar, 40)
        +add16_imm8(srccol, 40)
    }
    ldy #0
    +r(0)
    +r(1)
    +r(2)
    +r(3)
    +r(4)
;    ldy #0
;    .for (var i = 0; i < 25; i++) {
;    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.