From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,545551cf46d41dea X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!75g2000cwc.googlegroups.com!not-for-mail From: "Hyman Rosen" Newsgroups: comp.lang.ada Subject: Re: ICFP Programming Contest virtual machine in Ada Date: 1 Aug 2006 13:33:34 -0700 Organization: http://groups.google.com Message-ID: <1154464414.687174.209230@75g2000cwc.googlegroups.com> References: <87zmeobwtd.fsf@willow.rfc1149.net> <1154448852.738392.325930@p79g2000cwp.googlegroups.com> <87vepcb849.fsf@willow.rfc1149.net> NNTP-Posting-Host: 204.253.248.208 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1154464418 7852 127.0.0.1 (1 Aug 2006 20:33:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 1 Aug 2006 20:33:38 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 75g2000cwc.googlegroups.com; posting-host=204.253.248.208; posting-account=lJDDWg0AAACmMd7wLM4osx8JUCDw_C_j Xref: g2news2.google.com comp.lang.ada:6051 Date: 2006-08-01T13:33:34-07:00 List-Id: Samuel Tardieu wrote: > As you can see in the code, I used Stream_IO, which only considers raw > bytes, so this is not an issue. I don't know Ada, so pardon me if I'm saying something obviously wrong. Your code has when 10 => Put (Character'Val (Regs (C))); Flush; Is this Stream_IO or regular text IO? The contest has you download a binary file called codex.umz. When you register, you receive a "decompression key". When you run the machine against codex.umz, it eventually asks you for the key, then it goes into interactive mode. In that mode, you are asked to enter 'p', and when you do, the machine spits out the "decompressed" form of the codex using these opcode 10 put operands. This output needs to be captured and slightly edited to remove a header, and then the machine needs to be rerun on this output. If your Put is text and not binary, the output will be garbled, assuming that Ada's text Put does the usual LF => CR LF mapping.