ncatelli / spasm

An experimental multi-target assembler.
Apache License 2.0
4 stars 0 forks source link

Assembly doesn't correctly dereference a variable. #118

Closed ncatelli closed 3 years ago

ncatelli commented 3 years ago
.origin 0x8000

.define word PORTB 0x6000
.define word PORTA 0x6001
.define word DDRB 0x6002
.define word DDRA 0x6003

.define byte E 0b10000000
.define byte RW 0b01000000
.define byte RS 0b00100000

reset:
  lda 0xff
  sta DDRB

  lda 0b00000001
  sta DDRA

  lda 0b00000010
  sta PORTB

  lda 0b00000100
  sta PORTB

  lda 0b00001000
  sta PORTB

  lda 0b00010000
  sta PORTB

  lda 0b00100000
  sta PORTB

  lda 0b01000000
  sta PORTB

  lda 0b10000000
  sta PORTB

  lda 0b01000000
  sta PORTB

  lda 0b00100000
  sta PORTB

  lda 0b00010000
  sta PORTB

  lda 0b00001000
  sta PORTB

  lda 0b00000100
  sta PORTB

  lda 0b00000010
  sta PORTB

  lda 0b11111111
  sta DDRB

  lda 0b11100000
  sta DDRA

  lda 0b00111000
  sta PORTB
  lda 0x00
  sta PORTA
  lda E
  sta PORTA
  lda 0x00
  sta PORTA

  lda 0b00001110
  sta PORTB
  lda 0x00
  sta PORTA
  lda E
  sta PORTA
  lda 0x00
  sta PORTA

  lda 0b00000110
  sta PORTB

  lda 0x00
  sta PORTA

  lda E
  sta PORTA

  lda 0x00
  sta PORTA

  lda 0x48
  sta PORTB

  lda RS
  sta PORTA

  ora E
  sta PORTA

  lda RS
  sta PORTA

.origin 0xfffc
  .word 0x8000
  .word 0x0000
github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.1.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: