Soluzione esercizio n.2 – 28/06/2005S
	maxrel0.  IND <- A maxrel1.
	maxrel1.  D <- B maxrel2.
	maxrel2.  E <- 100 maxrel3.
	maxrel3.  C <- 0, T<- 0 maxrel4.
	maxrel4.  B <- RG[C], C <- C+1 maxrel5.
	maxrel5.  A <- RG[C], C <- C+1, P<-B maxrel6.
	maxrel6.  F <-A maxrel7.
	maxrel7.  B <-RG[C] maxrel8.
	maxrel8.   S <- segno(F-P) maxrel9.
	maxrel9.  (S=1) P <-F maxrel16.
	                (S=0) S<- segno(F-B) maxrel10
	maxrel10.(S=1) P <- F maxrel16.
	                (S=0) T<-T+1, maxrel11.
	maxrel11.S<-segno(F-E) maxrel12
	maxrel12.(S=0) K<-(-1) maxrel13
	                (S=1) K<-0 maxrel13
	maxrel13. S<-segno(30-C) maxrel14
	maxrel14. (S=0) P<- F maxrel16
	                 (S=1) DATAOUT <- T maxrel17
	maxrel16. F<-B, C<-C+1 maxrel7
	maxrel17. OP<-'write', set RDYOUT, maxrel18.
	maxrel18. (RDYIN, OR(ESITO)=0-) nop maxrel18
		(=11) N[28..31]<- ESITO, reset ACKIN, trattecc
		(=10) reset ACKIN, maxrel19
	maxrel19. (K0, INT=00) IC<-IC+1, ch0.
		(=01) IC<-IC+1, trattint
(10) IC<-D ch0
(11)  IC<-D trattint