Skip to content

Prevent some assembler breakages #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vvulpes0
Copy link

@vvulpes0 vvulpes0 commented Apr 9, 2025

  • high byte of INTEGER constant and LP_STRING length shifted to byte range in their respective byte arrays, preventing a crash
  • INTEGER modified to take an I16_OR_LABEL rather than just I16, to match the semantics of SET and to allow for preloaded vtables
  • place "v2.0 raw" at the top of generated files to match Hassem
  • place newline at end of ldata files like is done for lcode files
  • use __main__ instead of __init__ to pull in main

vvulpes0 added 2 commits April 9, 2025 11:11
* high byte of INTEGER constant and LP_STRING length shifted
  to byte range in their respective byte arrays, preventing a crash
* INTEGER modified to take an I16_OR_LABEL rather than just I16,
  to match the semantics of SET and to allow for preloaded vtables
* place "v2.0 raw" at the top of generated files to match Hassem
* place newline at end of ldata files like is done for lcode files
* use __main__ instead of __init__ to pull in main
@vvulpes0
Copy link
Author

vvulpes0 commented Apr 9, 2025

In the sample code below, the INTEGER(0xcafe) and LP_STRING(…) lines would previously cause a crash in the assembler. While fixing this, I added the ability to place labels as INTEGER constants to match the semantics of SET.

DLABEL(bigint)
INTEGER(0xcafe)
DLABEL(smallstr)
LP_STRING("test")
DLABEL(bigstr)
LP_STRING("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
DLABEL(addresses)
INTEGER(bigint)
INTEGER(bigstr)
INTEGER(main)

CBON()
LABEL(main)
SET(R1,bigint)
SET(R2,bigstr)
SET(R3,main)
SET(R4,end_main)
SUB(R5,R4,R3)
LABEL(end_main)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant