|
Post by roytam1 on Feb 3, 2014 22:57:39 GMT -8
|
|
|
Post by Adrian Cable on Feb 4, 2014 11:34:06 GMT -8
Hi, Lots of terminals (particularly non-Windows) were being screwed up by 8086tiny outputting the "non-printable" ASCII characters under 32 decimal. As a result, in 1.10 any characters below 32 are replaced with a space. This is why the arrows are no longer there, on Windows. (They never showed correctly on non-Windows platforms.)
I'll have a think about solutions to this problem that don't sacrifice the arrows on Windows.
-Adrian
|
|
|
Post by Adrian Cable on Feb 4, 2014 11:55:04 GMT -8
... in the mean time, you can re-enable the previous behaviour. If you edit BIOS.ASM, locate the label skip_attrib, and change
ja just_show_it
To
jmp just_show_it
Let me know how you get on.
-Adrian
|
|
|
Post by roytam1 on Feb 4, 2014 16:08:11 GMT -8
Hi, Lots of terminals (particularly non-Windows) were being screwed up by 8086tiny outputting the "non-printable" ASCII characters under 32 decimal. As a result, in 1.10 any characters below 32 are replaced with a space. This is why the arrows are no longer there, on Windows. (They never showed correctly on non-Windows platforms.) I'll have a think about solutions to this problem that don't sacrifice the arrows on Windows. -Adrian SETEDIT translates arrows to <(◄[17],←[27]) >(►[16],→[26]) ^(↑[24],▲[30]) v(↓[25],▼[31]) and others to "*", what do you think? setedit.sourceforge.net/Darwin_PPC.pngand another idea is to tell BIOS from 8086tiny weather host is windows or not, for to or not to translate control characters: --- 8086tiny.c 2014-02-04 14:33:56.718500000 +0800 +++ 8086tiny.cchr.c 2014-02-05 08:41:51.382250000 +0800 @@ -285,10 +285,15 @@ // Set DL equal to the boot device: 0 for the FD, or 0x80 for the HD. Normally, boot from the FD. // But, if the HD image file is prefixed with @, then boot from the HD. regs8[REG_DL] = ((argc > 3) && (*argv[3] == '@')) ? argv[3]++, 0x80 : 0; + // set hostiswin to 1 for windows host +#ifdef _WIN32 + regs8[REG_DH] = 1; +#endif + // Open BIOS (file id disk[2]), floppy disk image (disk[1]), and hard disk image (disk[0]) if specified for (file_index = 3; file_index;) disk[--file_index] = *++argv ? open(*argv, 32898) : 0; // Set CX:AX equal to the hard disk image size, if present
--- bios.asm 2014-02-04 14:30:54.109125000 +0800 +++ bios.cchr.asm 2014-02-05 11:15:42.449250000 +0800 @@ -194,10 +194,13 @@ ; Now we can do whatever we want! DL starts off being the boot disk. mov [cs:boot_device], dl + ; set hostiswin for int10 + mov [cs:hostiswin], dh + ; Set up Hercules graphics support. We start with the adapter in text mode push dx mov dx, 0x3b8 @@ -2598,10 +2601,11 @@ drive_sectors_temp dw 0 drive_heads_temp dw 0 drive_num_temp dw 0 boot_state db 0 cga_refresh_reg db 0 +hostiswin db 0 ; Default interrupt handlers int0: int1: @@ -3169,13 +3173,64 @@ skip_attrib: mov al, [di] - cmp al, 32 ; Convert non-printable ASCII to spaces + cmp byte [cs:hostiswin], 1 + je just_show_it + + cmp al, 31 ; Convert non-printable ASCII to '*' ja just_show_it - mov al, 32 + ;mov al, 32 + + cmp al, 17 + jne cnvcchr_1 + mov al, '<' + jmp just_show_it +cnvcchr_1: + cmp al, 27 + jne cnvcchr_2 + mov al, '<' + jmp just_show_it +cnvcchr_2: + cmp al, 16 + jne cnvcchr_3 + mov al, '>' + jmp just_show_it +cnvcchr_3: + cmp al, 26 + jne cnvcchr_4 + mov al, '>' + jmp just_show_it +cnvcchr_4: + cmp al, 24 + jne cnvcchr_5 + mov al, '^' + jmp just_show_it +cnvcchr_5: + cmp al, 30 + jne cnvcchr_6 + mov al, '^' + jmp just_show_it +cnvcchr_6: + cmp al, 25 + jne cnvcchr_7 + mov al, 'v' + jmp just_show_it +cnvcchr_7: + cmp al, 31 + jne cnvcchr_8 + mov al, 'v' + jmp just_show_it +cnvcchr_8: + cmp al, 0 + jne cnvcchr_9 + mov al, ' ' + jmp just_show_it +cnvcchr_9: + mov al, '*' + just_show_it: extended_putchar_al
|
|
|
Post by roytam1 on Feb 4, 2014 17:25:42 GMT -8
for Linux build, I don't know how to debug it since it runs and stalls after printing "FreeDOS". (I'm connecting to the linux box with ssh.)
centos5:~/8086tiny# gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.2 20080704 (Red Hat 4.1.2-54) centos5:~/8086tiny# gcc -g 8086tiny.c -DNO_GRAPHICS -O3 -fsigned-char -o 8086tiny centos5:~/8086tiny# gdb --args ./8086tiny bios fdhan.img GNU gdb (GDB) CentOS (7.0.1-45.el5.centos) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /root/8086tiny/8086tiny...done. (gdb) r Starting program: /root/8086tiny/8086tiny bios fdhan.img FreeDOS^C Program received signal SIGINT, Interrupt. 0x0057b424 in __kernel_vsyscall () (gdb) bt #0 0x0057b424 in __kernel_vsyscall () #1 0x001d62b3 in __read_nocancel () from /lib/libc.so.6 #2 0x08049362 in main (argc=0, argv=0x0) at 8086tiny.c:736 (gdb) c Continuing.
EDIT: alright I should use stty for that.
|
|
|
Post by Adrian Cable on Feb 5, 2014 7:31:17 GMT -8
roytam1, 8086tiny 1.15 should be released today, and will include a translation from the non-printable arrow characters to printable characters, along the lines of how you describe, except that instead of using a long CMP chain I use a single table and XLAT. I think this will do what you are looking for.
-Adrian
|
|
|
Post by mobluse on Feb 9, 2014 6:58:08 GMT -8
|
|
|
Post by roytam1 on Feb 9, 2014 17:50:02 GMT -8
this will force user to use UTF-8 in console, and bloat 8086tiny with codepage-to-unicode tables since people may use code pages other than CP437.
|
|