Prev: New NBASM IDE
Next: ugly?
From: io_x on
Do you know this could be RosAsm code?
Is it ugly?

; u32
; StampaVersoArr( u8* Arro, u32 ArroSize,
; u8* FileIn, u32 Cap, u32 verso, u32 nVersi)
; 0k, 4j, 8i, 12b, 16ra,
; 20P_Arr, 24P_ArrSz, 28P_FileIn, 28P_Cap, 32P_Verso, 36P_nVersi + 128
; 148 , 152 , 156 , 160 , 164 ,168
align 4
StampaVersoArr:
<b,i,j,k
s-=128
<< Arr=148, ArrSz=152, FileIn=156, Cap=160, Verso=164, nVersi=168
<< MemFile=40, MemSize=44, PosCap=48, PosCapS=52, NChars=56
<< Nc=60, ArroM=64
a=^Arr|i=^FileIn|a==0#.e
r=^ArrSz |^ArroM=a |r<=0?#.e|B*a=0|^Nc=r
a=^Cap |a>500 #.e|a==0 #.e|i==0#.e
a=^Verso |a>16000#.e|a==0 #.e
a=^nVersi|a>16000#.e| a#.1
..e: a^=a
..e0: stc|##.z
..e1: a=^MemFile|Free_sys(a)
a=^ArroM|a-=^Arr|#.e0
..1: b=&*s+MemFile|j=&*s+MemSize
PrendiFileInMemoria(b, j, i)|jc .e
i=*b|k=*j ; i=puntatore al contenuto, k=la sua lunghezza
; riempiamo il vettore dei Next per Capitolo &^16
a=&*s+88|InitKmn(a, 8, "Capitolo", 8)
a=&*s+88|r=^Cap|TrovaCapitolo(i, k, a, r)|jc .e1 ; non trovato
^PosCap=a|^NChars=c
i=a|r=^Cap|a=&*s+88|++r|TrovaCapitolo(i, c, a, r)
^PosCapS=a|j=^Verso|i=^PosCap|k=^NChars
^8=j|a=^nVersi|^8+=a|b=0|#.2
..ee1: ##.e1
..ee: ##.e
..1a: ^12=a|^16=r|++b|c=^ArroM|r=^Nc
B*c=9|a=1|B*c+1=0|^4=0 ; la prima riga da scrivere
^Nc-=a|<=?#.ee1|^ArroM+=a|jc .ee1|a=^12|r=^16|#.4
..2: r=s|a=^PosCapS|k=^NChars
; Stampa a partire dal Verso, nversi fino a max FineCap
TrovaVerso(r, i, k, j, a)|jnc .3|j==^Verso#.e1|#.5 ; usa *s, *s+4
..3: b==0#.1a
..4: i=*s
i+=a|jc .e1 ; i verso successivo
k-=a|<=?#.e1 ; k sono i caratteri successivi
^12=a|^NChars=k
k=^Nc
; int3
c=^ArroM
c>^Arr!#.4a|B*c-1==9!#.4a
--c|++k|^ArroM=c
PutSpacesNumber(c, k, 14, j)|jc .ee1|#.4b
..4a: PutNumber(c, k, j)|jc .ee1
..4b: k-=a|<=?#.ee1|^ArroM+=a|jc .ee1
c=^ArroM|r=^4|PutSpacesS(c,k,r)|jc .ee1
k-=a|<=?#.ee1|^ArroM+=a|jc .ee1
c=^ArroM|r=^0|a=^12|PutsACS(c,k,r,a)|jc .ee1
k-=a|<=?#.ee1|^ArroM+=a|jc .ee1
++j| j<^8#.2
..5: a=^MemFile|Free_sys(a) |jc .ee
a=^ArroM|a-=^Arr|clc
..z:
>> Nc, ArroM
>> MemFile, MemSize, PosCap, PosCapS, NChars
>> Arr, ArrSz, FileIn, Cap, Verso, nVersi
s=&*s+128
>b,i,j,k
ret 24


 | 
Pages: 1
Prev: New NBASM IDE
Next: ugly?