This page (revision-15) was last changed on 05-Jan-2024 20:44 by Peter Prodehl 

This page was created on 05-Jan-2024 12:09 by Peter Prodehl

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
15 05-Jan-2024 20:44 529 bytes Peter Prodehl to previous
14 05-Jan-2024 20:43 529 bytes Peter Prodehl to previous | to last
13 05-Jan-2024 20:43 521 bytes Peter Prodehl to previous | to last
12 05-Jan-2024 16:52 509 bytes Peter Prodehl to previous | to last
11 05-Jan-2024 16:52 513 bytes Peter Prodehl to previous | to last
10 05-Jan-2024 16:23 505 bytes Peter Prodehl to previous | to last
9 05-Jan-2024 15:51 503 bytes Peter Prodehl to previous | to last
8 05-Jan-2024 15:50 492 bytes Peter Prodehl to previous | to last
7 05-Jan-2024 15:48 486 bytes Peter Prodehl to previous | to last
6 05-Jan-2024 15:40 506 bytes Peter Prodehl to previous | to last
5 05-Jan-2024 15:39 496 bytes Peter Prodehl to previous | to last
4 05-Jan-2024 15:38 498 bytes Peter Prodehl to previous | to last
3 05-Jan-2024 15:32 490 bytes Peter Prodehl to previous | to last
2 05-Jan-2024 12:21 230 bytes Peter Prodehl to previous | to last
1 05-Jan-2024 12:09 6 bytes Peter Prodehl to last

Page References

Incoming links Outgoing links
Betrag

...nobody

Version management

Difference between version and

At line 1 changed one line
Dr.Irata (Peter)
Betrag bestimmen bei Subtraktion:
At line 3 changed one line
**MADS-Subroutine** _betrag_
Beispiel: c = |a-b|
also bei a=10 und b=6 ---> c=4
und bei a=6 und b=10 ---> c=4
At line 7 added one line
Code:
At line 6 changed one line
.proc betrag ; Wertebereich 8 Bit(0-255)
At line 8 changed 3 lines
lda var1
sbc var2
bcs weiter ; (var1 >= var2) --> weiter
lda a
sbc b
bcs weiter
At line 12 changed 6 lines
eor #$ff ; Zahl nochmal negieren
weiter
sta var3
rts
.endp
eor #$ff
weiter sta c
At line 20 removed 20 lines
**Betrag bestimmen bei Subtraktion:**
Mathematisch:
Beispiel: c = |a-b|
also bei a=10 und b=6 => c=4
und bei a=6 und b=10 => c=4
**Basic:**
c = abs(a-b)