Add complex-app example: loops, pointers, structs, bit shifts/masks#10
Merged
Merged
Conversation
… masks Agent-Logs-Url: https://github.com/corepunch/armvm/sessions/07d29fa2-b60c-433b-b1bc-cbbf5927fac1 Co-authored-by: corepunch <83646194+corepunch@users.noreply.github.com>
Agent-Logs-Url: https://github.com/corepunch/armvm/sessions/07d29fa2-b60c-433b-b1bc-cbbf5927fac1 Co-authored-by: corepunch <83646194+corepunch@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
corepunch
April 16, 2026 18:46
View session
Owner
|
@copilot Add also structs in app and pointers to functions in those structs |
Copilot stopped work on behalf of
corepunch due to an error
April 16, 2026 18:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
examples/complex-app/— a richer ARM VM example alongside the existingsimple-app, covering the full range of typical embedded/systems code patterns.New files
input.c— C source with three internal functions plusmain:compute_flags(value, shift, mask)— register-controlled shift + AND masksum_array(arr*, count)— counted loop over a pointer/arrayprocess_record(record*)— struct-like field access via pointer offsets + bitwise ORcomplex.s— hand-written ARMv7 assembly (Apple/ARM UAL syntax); pre-generated so it runs on Linux without a cross-compilermain.c— host registeringprint_intandprint_stringviaavm_register()Makefile—make runuses the checked-in assembly;make allregenerates frominput.con macOS with XcodeAssembly highlights
Expected output