File: swaphex.asm

package info (click to toggle)
gnusim8085 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 2,760 kB
  • sloc: ansic: 9,913; sh: 9,152; asm: 226; makefile: 160; xml: 53; sed: 16
file content (37 lines) | stat: -rw-r--r-- 365 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
;Copyright (C) 2003  Sridhar Ratnakumar <srid@srid.ca>
;Distributed under same license as rest of the program i.e. GPL v2 or later.
;See COPYING file for license text.


;Program to swap hex digits

	jmp start

;data


;code
start:	mvi a,91h
	mov b,a
	ani 0fh

	mov c,a
	mov a,b
	ani 0f0h

	rrc
	rrc
	rrc
	rrc

	mov d,a
	mov a,c
	
	rlc
	rlc
	rlc
	rlc

	add d

	hlt