repository service wrote:
Author: stepan Date: Mon Apr 26 15:06:48 2010 New Revision: 753 URL: http://tracker.coreboot.org/trac/openbios/changeset/753
Log: This is toke / detok update from Matthias Kapffer:
- display-status is obsolete
- fix the three broken examples under toke/examples
- drop calls to non-existent distclean
Oh that's interesting - I didn't realise people were still working on this. In that case, here's another quick bug report I noticed whilst playing with the Fcode test cases last year:
1) Create a file test.fth containing the following: 12a u.
2) Confirm it works with openbios-unix openbios-unix < test.fth
Welcome to OpenBIOS v1.0 built on Apr 26 2010 14:09 Type 'help' for detailed information
[unix] Booting default not supported.
0 > 12a u. 12a ok
3) Now try and run it through toke
./toke/toke test.fth Welcome to toke - OpenBIOS tokenizer v1.0.2 (C) Copyright 2001-2006 Stefan Reinauer. (C) Copyright 2006 coresystems GmbH info@coresystems.de (C) Copyright 2005 IBM Corporation. All Rights Reserved. This program is free software; you may redistribute it under the terms of the GNU General Public License v2. This program has absolutely no warranty.
Tokenizing test.fth Binary output to test.fc Error: File test.fth, Line 1. Word 12a is not in dictionary. Tokenization Completed. 1 Error. Suppressing binary output.
4) Hmmm. Alter test.fth so it reads the following: 129 u.
5) Run it through toke again:
./toke/toke test.fth Welcome to toke - OpenBIOS tokenizer v1.0.2 (C) Copyright 2001-2006 Stefan Reinauer. (C) Copyright 2006 coresystems GmbH info@coresystems.de (C) Copyright 2005 IBM Corporation. All Rights Reserved. This program is free software; you may redistribute it under the terms of the GNU General Public License v2. This program has absolutely no warranty.
Tokenizing test.fth Binary output to test.fc Tokenization Completed. toke: wrote 6 bytes to bytecode file 'test.fc'
6) It works! And now run the output back through detok:
./detok/detok test.fc
\ Invalid FCode Start Byte. Ignoring FCode header. b(lit) 0x81 u. \ FCode-ender not found \ Detokenization finished normally after 6 bytes. Unexpected end of file.
So it seems that while openbios-unix reads/writes numbers in hex, toke/detok will only read/write numbers in decimal.
ATB,
Mark.