Skip to content
Snippets Groups Projects
Commit 10481fff authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Vortragsfolien und Beispiele 26.4.2022

parent d0556e77
Branches
No related tags found
No related merge requests found
Showing
with 189 additions and 0 deletions
../script/alu.jpg
\ No newline at end of file
File added
../common/astabile-kippstufe.png
\ No newline at end of file
;name Cat Can
;author A. Kirchner, F. Uy, minor changes by P. Gerwinski
;assert 1
;
; Your basic two sweep methodical bomber.
; Fires SPL 0 and JMP -1 at every eight
; addresses, then erases the core with
; DAT bombs.
start mov trap2, < bomb
mov trap1, < bomb
sub # 6, bomb
jmn start, bomb ; trap loop
set mov # -5, bomb
kill mov bomb, @ bomb
djn kill, bomb ; kill loop
reset jmp set
bomb dat # -8
trap1 spl 0
trap2 jmp -1
end start
;name Chamaeleon
;version 7.8b (19.9.1991, modifiziert am 12. und 17.11.2012)
;author Peter Gerwinski
;assert 1
step equ 97
pos dat #42, #-20
melden mov hallo, ctrl ; Gefangener Gegner meldet sich
cntdwn sub #1, ctr ; Runtime-Fallen-Fini
falle spl cntdwn
mov fnum, <hallo
jmn falle, ctr
fnum dat #0, #(cntdwn - hallo) ; echtes Fini
ctrl djn ctrl, test ; Haupt-Task überwachen
spl piranh
fini mov fnum, <hallo
ctr jmp fini, #MAXPROCESSES
hallo jmp (fini - ctrl), #(selbst + 20 - hallo) ; Klingel für gefangenen Gegner
muni2 jmp 1
muni jmp @42, #(melden - pos) ; Munition
piranh mov #9, muni ; Piranhas, Version 2.4
ploop mov @muni, <ppos
pziel mov pmuni, (ppos - 20)
sub #73, pziel
djn ploop, muni
ppos spl @0, #833
add #653, ppos
jmz piranh, muni
pmuni dat #0, #0
start spl ctrl ; Überwachungs-Task aktivieren
loop mov #12, test ; Watchdog zurücksetzen
cmp @pos, <pos ; Gegner mit großer Schrittweite suchen
jmp feuer
sub #step, pos
cmp @pos, <pos
jmp feuer
sub #step, pos
cmp @pos, <pos
jmp feuer
sub #step, pos
jmp loop
feuer mov pos, psave
add #step, pos
such mov #11, test ; Watchdog
jmn gefu, <pos ; Gegner mit Schrittweite 1 suchen
jmn gefu, <pos
jmn gefu, <pos
jmn gefu, <pos
jmz such, <pos
gefu cmp pos, spos ; Erkenne dich selbst!
jmn drauf, 1
mov psave, pos
sub #step, pos
djn loop, selbst
mov hallo, ctrl ; Bei Langeweile: fini
jmp fini
drauf mov #13, test ; Gegner mit jmp-Bomben eindecken
mov muni, @pos
sub pos, @pos ; Sprung in die Falle
mov muni2, <pos
mov muni2, <pos
mov muni2, <pos
mov muni2, <pos
mov muni2, <pos
mov muni2, <pos
mov psave, pos
sub #step, pos
djn loop, genug
jmp fini ; Zu viel zu Bombardieren: fini und Piranhas
spos dat #42, #(selbst - pos)
psave dat #0, #0
test dat #0, #2
genug dat #0, #10
selbst dat #0, #37
end start
;redcode
;name Dwarf
;author A. K. Dewdney
;strategy Throw DAT bombs around memory, hitting every 4th memory cell.
;strategy This program was presented in the first Corewar article.
bomb DAT #0
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.
;redcode
;name fini
;version (8.1990)
;author Bodo Mller
;assert 1
;+--------------------------------------------------------------------------+
;| FINI ( = Endstufe von PARALYSE) Version 1.0 by B.M. Aug. '90 |
;+--------------------------------------------------------------------------+
NUM DAT #-2
START MOV NUM, <POS
LOOP JMP START
POS DAT #-3
END START
;name Knirps
;assert 1
start mov 0, 1
end start
../common/logo-hochschule-bochum-cvh-text-v2.pdf
\ No newline at end of file
../common/logo-hochschule-bochum.pdf
\ No newline at end of file
;name Mice
;author Chip Wendell
;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
spl @dest ; split(*dest)
add #653, dest ; dest += 653
jmz start, ptr ; if(!ptr)
; goto start
dest dat #833
end start
;name Nothing
;assert 1
start jmp 0
end start
../common/pgslides.sty
\ No newline at end of file
../common/pst-circ-pg.sty
\ No newline at end of file
../common/schwingquarz-geoeffnet.jpg
\ No newline at end of file
../common/schwingquarz.jpg
\ No newline at end of file
20220426/speicheradressierung-3.png

87.4 KiB

;name Mice --> Springmaus
;author Chip Wendell --> Peter 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 ; split(*dest)
add #653, dest ; dest += 653
jmz start, ptr ; if(!ptr)
; goto start
dest dat #833
end start
20220426/takt-zaehler-4.png

133 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment