Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ORG 1800H
- START:
- LD B,10
- LD HL,1850H
- LD DE,1860H
- START: 1
- LD A,(HL)
- LD (DE),A
- DEC B
- JP Z,INI
- INC HE
- INC DE
- JP START 1
- INI:
- LD D,9
- SORT:
- LD IX,1860H
- LD B,09
- hee:
- LD A,(IX+0)
- LD C(IX+1)
- CP C
- JP C,NEXT
- LD (IX+0),C ;SWAP
- LD (IX+1),A
- NEXT:
- INC IX
- DEC B
- JP NZ,hee
- DEC D
- JP NZ,SORT
- HALT
- ORG 1850H
- DEFB 7
- DEFB 5
- DEFB 6
- DEFB 8
- DEFB 7
- DEFB 4
- DEFB 2
- DEFB 3
- DEFB 1
- DEFB 0
- END START
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement