dasm-assembler / dasm-assembler/dasm

expose REPEAT count as usable label

Open
#27 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
257
Forks
55
PR merge metrics
No merged PRs in 30d

Description

Would be really useful to expose the current iteration counter in REPEAT/REPEND loops.
I know it's do-able with bracketing SET/increment statements, for example...

.TEMP SET 0
REPEAT 3
.byte .TEMP
.TEMP SET .TEMP + 1
REPEND

If it were easy in the code, then something like...

REPEAT 3
.byte @ ; where @ is the current repeat loop #
REPEND

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the assembler handling for REPEAT/REPEND and the existing SET expression mechanism. Determine how a loop counter could be exposed using the proposed @ syntax, then verify that the example emits the expected sequence for each repetition.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.