jart / jart/sectorlisp

Confusing comment on a JS branch instruction

Open
#37 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1.5k
Forks
76
PR merge metrics
No merged PRs in 30d

Description

https://github.com/jart/sectorlisp/blob/fc6fa331d23807cae685a1cfbcb3e2955e2aa08f/sectorlisp.S#L113-L114

This says:

* "set sf=1 if cons"
* `js` (jump if sign bit set)
* "jump if not cons"

The `js` jump actually jumps if `sf=1` so there is a contradiction here. I don't understand the code enough to determine which comment is wrong.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read sectorlisp.S at lines 113-114 and inspect the surrounding boot-sector branch logic. Verify the condition used by the js instruction against the nearby cons test, then update the contradictory comment so it accurately describes the code. Done means the comments consistently explain whether the branch is taken for cons or non-cons values.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.