Structs in ACME, wie?

There are 6 replies in this Thread which has previously been viewed 733 times. The latest Post (March 21, 2025 at 11:16 AM) was by Endurion.

  • Um es kurz zu machen, wie kann man das hier schöner schreiben?

    Code
    CursorX = $04 ; and $05 - The "mouse" cursor position in X
    CursorY = $06 ; The "mouse" cursor position in Y
    CursorB = $07 ; Is non-zero when the button was pushed
    CursorSpeedIndex = $08 ; Counts up to $20 and then doubles the cursor speed

    Irgendwas wo ich nur die Startadresse angebe und das ganze dann von alleine hoch zählt, die Doku war leider nicht so ganz hilfreich. -.-

    Blog: Please login to see this link. - The Seventies Board: Please login to see this link. Please login to see this link.

    Ein Terminal und ein Z80 :D

  • Moin,

    warum nicht einfach eine Startadresse für die Labelzuweisung nehmen?

    Code
    base = $04
    CursorX = base   ; and $05 - The "mouse" cursor position in X
    CursorY = base+2 ; The "mouse" cursor position in Y
    CursorB = base+3 ; Is non-zero when the button was pushed
    CursorSpeedIndex = base+4 ; Counts up to $20 and then doubles the cursor speed
  • warum nicht einfach eine Startadresse für die Labelzuweisung nehmen?

    Dann muss man immer noch alles nachschieben wenn man irgendwo etwas hinzufügen will, oder es hinten dran pappen. Genau das wollte ich eigentlich vermeiden.
    Aber gut, was nicht ist das ist halt nicht. :emojiSmiley-04:

    Blog: Please login to see this link. - The Seventies Board: Please login to see this link. Please login to see this link.

    Ein Terminal und ein Z80 :D

  • Ich mach meist so was:

    Code
    CursorX = $04    ; and $05 - The "mouse" cursor position in X
    CursorY = CursorX+2 ; The "mouse" cursor position in Y
    CursorB = CursorY+1 ; Is non-zero when the button was pushed
    CursorSpeedIndex = CursorB+1 ; Counts up to $20 and then doubles the cursor speed

    Das ist jetzt auch nicht der Gipfel der Eleganz, aber man kann recht leicht Werte einfügen.

    ────────────────────────────────────────────────────────────
    Please login to see this link. - Please login to see this link.
    ────────────────────────────────────────────────────────────

  • Vielleicht geht das, probier mal aus:

    Code
    *=$04
    
    CursorX !skip 2
    CursorY !skip 1
    CursorB !skip 1
    CursorSpeedIndex !skip 1
    
    *=$c000
  • Vielleicht geht das, probier mal aus:

    Code
    *=$04
    
    CursorX !skip 2
    CursorY !skip 1
    CursorB !skip 1
    CursorSpeedIndex !skip 1
    
    *=$c000

    Damit wird eine Code-Datei beginnend bei $0004 angelegt, die riesen groß ist. Aber das hat mich grad auf eine Idee gebracht, die tut:

    Damit wird so getan, als wäre der Programmcounter bei $04, die Werte werden aber ab $C000 angelegt. Anschließend wird das ganze durch das eigentliche Programm überschrieben. Damit keine Warnungen ausgegeben werden braucht man das `invisible`.

    Anstelle von `!skip` kann man auch `!wo 0` bzw. `!by 0` verwenden. Dann muss man nicht selber bis 2 zählen. :D

  • Gab's bei ACME nicht auch die virtual !byte-Statements?

    Sowas

    * = 4

    CursorX !byte ?

    CursorY !byte ?

    CursorB !byte ?

    ...

    Solange ein Segment rein virtuell ist, werden die Daten nicht ins Compilat übernommen.

    C64Studio: Please login to see this link. - Please login to see this link. --- C64Studio WIP: Please login to see this link. - Please login to see this link. --- Please login to see this link.