Compute addresses for all ASM-OBJECTs

This commit is contained in:
John Lorentzson 2025-07-03 16:56:49 +02:00
parent a24c5353a5
commit 771748d2c2

View file

@ -219,10 +219,9 @@
(let ((address origin-address))
(loop :for asm-obj := start-instruction :then (next asm-obj)
:until (null asm-obj)
:do (cond ((typep asm-obj 'asm-label)
(setf (address asm-obj) address))
((typep asm-obj 'asm-instruction)
(incf address (byte-length asm-obj)))))
:do (setf (address asm-obj) address)
:when (typep asm-obj 'asm-instruction)
:do (incf address (byte-length asm-obj)))
(values start-instruction address)))
(defun link-assembly (start-instruction origin-address)