Constants in Z80 Assembler

The place for codemasters or beginners to talk about programming any language for the Spectrum.
User avatar
ketmar
Manic Miner
Posts: 713
Joined: Tue Jun 16, 2020 5:25 pm
Location: Ukraine

Re: Constants in Z80 Assembler

Post by ketmar »

ParadigmShifter wrote: Fri Oct 13, 2023 7:26 pm I should really make a macro that does that :)
snippet from UrAsm docs:

Code: Select all

known functions in math expressions
===================================
  defined(xxx) -- is label "xxx" value defined?
  known(xxx) -- is label "xxx" seen? (its value may be still undefined)
  aligned256(xxx) -- xxx%256 == 0
  align(xxx[, what]) -- align xxx by what, default what == 256
  sameseg(x0, x1) -- x0/256 == x1/256
  low(xxx) -- low byte of xxx
  high(xxx) -- high byte of xxx
  abs(xxx) -- absolute value of xxx
  bswap(xxx) -- swap bytes in 16-bit word

  scraddr8x8(x, y, base=#4000) -- calculate screen address; coords are in chars
  scraddr8x1(x, y, base=#4000) -- calculate screen address; x coord is char, y coord is pixel
  scrattr8x8(x, y, base=#4000) -- calculate attribute address; coords are in chars
hehe.
Post Reply