view qt.asm @ 2:eac01194cb9a tip

annotated qt variant (annotqt)
author C. Masloch <pushbx@38.de>
date Thu, 25 Oct 2012 18:40:16 +0200
parents cc13c6671f25
children
line wrap: on
line source
;86dos/nasm/quine
;public-domain,20110613,20121025,ecm
cpu 8086
org 256
a:
mov dx,d
mov cx,D
call c
mov di,d
l:
mov dx,p
mov cx,P
call u
mov dx,di
mov al,10
mov cx,-1
repne scasb
mov cx,di
dec cx
dec cx
sub cx,dx
call u
mov dx,s
mov cx,S
call u
cmp di,o
jne l
mov dx,e
mov cx,E
call u
mov ax,4C00h
int 33
c:
mov si,dx
jcxz .d
.l:
lodsb
cmp al,64
jne .n
push cx
push si
call .t
mov dx,q
mov cx,Q
call u
pop dx
pop cx
.n:
loop .l
.d:
inc si
.t:
lea cx,[si-1]
sub cx,dx
u:
mov bx,1
mov ah,64
int 33
retn
q:
db '"'
Q equ $-q
p:
db 'db "'
P equ $-p
s:
db '",13,10',13,10
S equ $-s
e:
db "o:",13,10
db "D equ $-d",13,10
E equ $-e
d:
db ";86dos/nasm/quine",13,10
db ";public-domain,20110613,20121025,ecm",13,10
db "cpu 8086",13,10
db "org 256",13,10
db "a:",13,10
db "mov dx,d",13,10
db "mov cx,D",13,10
db "call c",13,10
db "mov di,d",13,10
db "l:",13,10
db "mov dx,p",13,10
db "mov cx,P",13,10
db "call u",13,10
db "mov dx,di",13,10
db "mov al,10",13,10
db "mov cx,-1",13,10
db "repne scasb",13,10
db "mov cx,di",13,10
db "dec cx",13,10
db "dec cx",13,10
db "sub cx,dx",13,10
db "call u",13,10
db "mov dx,s",13,10
db "mov cx,S",13,10
db "call u",13,10
db "cmp di,o",13,10
db "jne l",13,10
db "mov dx,e",13,10
db "mov cx,E",13,10
db "call u",13,10
db "mov ax,4C00h",13,10
db "int 33",13,10
db "c:",13,10
db "mov si,dx",13,10
db "jcxz .d",13,10
db ".l:",13,10
db "lodsb",13,10
db "cmp al,64",13,10
db "jne .n",13,10
db "push cx",13,10
db "push si",13,10
db "call .t",13,10
db "mov dx,q",13,10
db "mov cx,Q",13,10
db "call u",13,10
db "pop dx",13,10
db "pop cx",13,10
db ".n:",13,10
db "loop .l",13,10
db ".d:",13,10
db "inc si",13,10
db ".t:",13,10
db "lea cx,[si-1]",13,10
db "sub cx,dx",13,10
db "u:",13,10
db "mov bx,1",13,10
db "mov ah,64",13,10
db "int 33",13,10
db "retn",13,10
db "q:",13,10
db "db '@'",13,10
db "Q equ $-q",13,10
db "p:",13,10
db "db 'db @'",13,10
db "P equ $-p",13,10
db "s:",13,10
db "db '@,13,10',13,10",13,10
db "S equ $-s",13,10
db "e:",13,10
db "db @o:@,13,10",13,10
db "db @D equ $-d@,13,10",13,10
db "E equ $-e",13,10
db "d:",13,10
o:
D equ $-d