After adding the missing size check, #LuaLang behavior is much more benign.
A 64K segment size limit on table sizes isn't ideal, but it beats a hard crash, and it's a stable jumping-off point for further modifications.
After adding the missing size check, #LuaLang behavior is much more benign.
A 64K segment size limit on table sizes isn't ideal, but it beats a hard crash, and it's a stable jumping-off point for further modifications.
@TechTangents glad to see you rescued an 8086 from the dumpster!
https://www.youtube.com/watch?v=apFLq3-fpL4
#i8086 #i86 #Tandy #Tandy1000RLHD #Tandy1000 #PC #VintageComputing
@f4grx meanwhile, I also have something for you and other gdb with qemu users ;)
Installation
Either check out the directory with AnonCVS…
cd
mkdir -p .etc
cd .etc
cvs -Rqd _anoncvs@anoncvs.mirbsd.org:/cvs co -PA -d gdb contrib/hosted/tg/gdb
… or download the individual files (all but .cvsignore) from CVSweb https://mbsd.evolvis.org/cvs.cgi/contrib/hosted/tg/gdb/ (user=pass public due to LLM scrapers) and put them into a new directory ~/.etc/gdb/.
If you don’t use qemu 5.2 (Debian bullseye) or one with compatible XML files, you’ll have to do extra work. See below the <hr /> at the end of the post for this and a compatibility table.
Then, symlink ~/.etc/gdb/.gdbinit to ~/.gdbinit or merge things into yours if you already have one.
Usage
Start qemu either as qemu-system-i386 -S -s … (to run a 32-bit VM, then you use the qemu32 command inside gdb) or qemu-system-x86_64 -S -s … (to run a 64-bit VM, then you use the qemu64 command inside gdb). The -S makes it wait for a gdb c command before even booting. This gives you ample time to attach both vncviewer (as qemu lost its builtin SDL GUI 🤬🤬🤬) and gdb.
Start gdb and issue the user-defined qemu32 or qemu64 command.
BIOS
For a classical BIOS system, you’ll be in 16-bit real mode at F000:FFF0 at the beginning, so if you want to debug there a bit, run the c16 command to switch over, do a b *0x7c00 to set a breakpoint on the MBR, c to run until there, i to inspect the registers, u or uu COUNT to disassemble some, t to step into and tt to step over (uses a temp breakpoint at the next address, so make sure the mode is correct). Once it enters protected mode, issue the c32 command, once it enters long mode (if any), issue the c64 command. I’ve tested this with a MirBSD/i386 ISO and a Grml/amd64 ISO.
EFI
For your EFI scenario, set a breakpoint on your multiboot entry point (I used b *0x00100074 having gotten the address from nm on your ELF file, if you have symbols you can do that) and run c. Once it breaks, run the c32 command. Same as above, you can then use i, u, uu COUNT, t, tt, … (there’s also an i32 command if you prefer gdb’s standard format, it’s cleaned up a little, the i16 one is inspired by DOS DEBUG.COM; for 64-bit mode, only i64 is available in gdb’s format but the other still work and show the truncated values, perhaps somewhat usefully, especially for #x32 / #amd64ilp32 or when running a 32-bit userspace program). You can use c32 and c64 to switch between the modes and even use c16 if your bootloader exits 32-bit mode (e.g. to run BIOS calls before entering long mode), though that will be exceedingly rare in an EFI setup. I’ve tested that with the ISO you gave me.
others
The d and r2p commands are less useful to you, as they work with 16:16 segmented far pointers. The other commands (printqs5static, printqs5dynamic and the offsetof macro) are perhaps more useful when debugging host applications.
I’ve tried to make this not break when gdb is used for nōn-x86 targets, though the usability is limited there, of course.
HTH & HAND!
tdesc files
Compatibility matrix
As far as I can tell, the earliest version in which the tdesc XML files work is qemu 4.0.0 so you can exclude this for anything older.
There is, at the time of this writing, only one more commit (75ac231c67cdb13f0609943fab5499963858b587) on these files, which begun to be included with qemu 7.2.0 so anything between 4.0.0 and 7.1.x uses the same format, the one of the files contained in the repo.
Though, from the commit message, it looks like the diff…
- <flags id="i386_efer" size="8">
+ <flags id="i386_efer" size="4">
… might be needed anyway, and it affects qemu-system-i386 only, too. Do this too if you get the Remote 'g' packet reply message and it differs by four bytes only.
Updating the tdesc files
If you find that your qemu’s files have sufficiently changed from the version I committed, you need to do the following:
i386-32bit.xml and i386-64bit.xml with these from the gdb-xml/ directory of the source tarball of your qemu version<!-- obtained from qemu VERSION --> comment into line 2 like I did, so future you will be less surprised if he has to work with this morei386-64bit32.sh script to regenerate the i386-64bit32.xml file from the new i386-64bit.xml file (do some diffing to verify the changes are still good in your version)Then you’re all set and can test things.
#x86 #i8086 #i386 #amd64 #gdb #qemu #debugging #asm #assembly
Just to be clear:
The #tiny486 is intended as a #devkit for #i486 (in theory even #i386, #i8086 or any other platform that does #ISA (& #PCI) or where one's willing to accept less functionality of a #PC104 compared to #PC104Plus.
As a #BareMetal reference platform for #OS1337 / @OS1337 because there is a demand for a "#BridgeMachine" with new parts even if it's just to do #Archival and #DataRecovery duties and help setup modern drop-in replacements.
Низкоуровневое программирование под 8086 для любопытных, часть 2
В этой части нас ждёт погружение в один из способов организации мультипоточности на базе единственного ядра процессора. Мы научимся принудительно переключать выполнение между полностью зацикленными участками кода, ничего не "знающими" о каком-то другом коде, конкурирующем за процессорное внимание. По ходу повествования будут даны все необходимые пояснения и читателю не придётся обращаться к другим источникам, кроме первой части статьи.
https://habr.com/ru/articles/907312/
#assembler #i8086 #низкоуровневое_программирование #agalilov #прерывания #стек #видеобуфер #ассемблер #ассемблер_для_начинающих #мультизадачность
Низкоуровневое программирование под 8086 для любопытных, часть 1
В первой части мы: - посмотрим, как работать с памятью и регистрами 8086 - узнаем, как написать простую программу на ассемблере прямо в отладчике - изучим работу механизма прерываний и сделаем демонстрационный пример Статья рассчитана на тех, кто имеет начальный опыт программирования, но хочет понять основы низкоуровневого программирования и многозадачности. Примеры в бинарном виде доступны по ссылке https://github.com/galilov/habr/blob/main/asm-8086-galilov.zip .
https://habr.com/ru/articles/902412/
#Assembler #i8086 #низкоуровневое_программирование #agalilov #прерывания #стек #видеобуфер #регистры #ассемблер #ассемблер_для_начинающих
Some "Polish-made microcomputers"
'80
#PolishMicrocomputers #RetroComputers #HistoryOfComputing #ComputersOfThePRL #Microcomputers #RetroTechnology #VintageComputers #8085 #U880 #Z80 #6502 #i8086
@sabi Tho depending on your budget, time and skills it may be Worth the effort for you to look at the #Wee86, #WeeCe, #86duino and other projects and see if something like a #SOM / #SBC module with #ISA + custom #PCB may even be a better option, as there are #Vortex86 Chips down to #i8086+#i8087 and those will sip even less power than the #NuXT, making it way more fitting for a short 19" 1U enclosure if you want it to be basically #fanless and #silent to tue point of only having the PC-Speaker as source of noise...
https://www.youtube.com/watch?v=aJEp4ZUG7BI
But IDK if you're good at PCB design or what your skillset is in detail or if you just want one for yourself or something you can market to others as a side biz...
@apalu @phoronix What I mean is that #Xorg is #EoL'd and that all the #legacy stuff works in #Xwayland and using #Wayland for newer solutions is the way to go.
Also #Linux did already drop a lot of #Hardware #support over the years because it was either #unmaintained [a lot of older stuff], #never publicly available [#Intel #GMA500 & #GMA3000-Series...] or was deemed to cumbersome to continue forward [vanilla #i386 support for example]...
As much as I wished we could perpetually make stuff that just runs on an #i8086, that just won't work and just like #UnrealEngine5 won't support #32bit systems or 7th generation game console, so it makes sense that #SDL3 won't support #X11...
I mean, #SDL2 is still available and working so if one needs #X support on #Linux, consider using that.
And yes, I do have machines that are from the 2000s that have such hardware that is affected by it...
SvarDOS - a minimalistic but also powerful DOS distribution, that clearly got shaped by modern Linux distros: it has rolling releases and an online package manager that runs on 8086, too.
“Care is taken so SvarDOS remains 8086-compatible, at least in its most basic (core) configuration.”
MIT license
Finding undocumented 8086 instructions via microcode.
https://hackaday.com/2023/07/17/finding-undocumented-8086-instructions-via-microcode/