Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rechnertechnik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Gerwinski
Rechnertechnik
Commits
dff0fe8b
Commit
dff0fe8b
authored
4 years ago
by
Peter Gerwinski
Browse files
Options
Downloads
Patches
Plain Diff
Beispiele 25.5.2021
parent
400d8ad4
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
20210525/dwarf2.red
+17
-0
17 additions, 0 deletions
20210525/dwarf2.red
20210525/dwarf3.red
+17
-0
17 additions, 0 deletions
20210525/dwarf3.red
20210525/mice-jump.red
+13
-0
13 additions, 0 deletions
20210525/mice-jump.red
with
47 additions
and
0 deletions
20210525/dwarf2.red
0 → 100644
+
17
−
0
View file @
dff0fe8b
;redcode
;name Dwarf
;author A. K. Dewdney, P. Gerwinski
;strategy Throw DAT bombs around memory, hitting every 4th memory cell.
;strategy This program was presented in the first Corewar article.
; Variante, die bessere Chancen gegen Knirps hat
bomb DAT #1
DAT #0 ; Knirps-Falle
dwarf ADD #4, bomb
MOV bomb, @bomb
JMP dwarf
END dwarf ; Programs start at the first line unless
; an "END start" pseudo-op appears to indicate
; the first logical instruction. Also, nothing
; after the END instruction will be assembled.
This diff is collapsed.
Click to expand it.
20210525/dwarf3.red
0 → 100644
+
17
−
0
View file @
dff0fe8b
;redcode
;name Dwarf
;author A. K. Dewdney, P. Gerwinski
;strategy Throw DAT bombs around memory, hitting every 4th memory cell.
;strategy This program was presented in the first Corewar article.
; Variante, die noch bessere Chancen gegen Knirps hat ... oder auch nicht ... ?!?
bomb DAT #1
DAT #0 ; Knirps-Falle
dwarf ADD #5, bomb
MOV bomb, <bomb
JMP dwarf
END dwarf ; Programs start at the first line unless
; an "END start" pseudo-op appears to indicate
; the first logical instruction. Also, nothing
; after the END instruction will be assembled.
This diff is collapsed.
Click to expand it.
20210525/mice-jump.red
0 → 100644
+
13
−
0
View file @
dff0fe8b
;name Mice
;author Chip Wendell, P. Gerwinski
;assert 1
ptr dat #0
start mov #12, ptr ; n = 12
loop mov @ptr, <dest ; *dest = *(ptr+(*ptr))
djn loop, ptr ; if(--ptr != 0)
; goto loop
jmp @dest ; jump(*dest)
dest dat #833
end start
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment