4 ms·
Somebody should wrap this into a VGA-As-A-Service platform so that kids could learn programming the correct way: mov ax, 13h int 10h
by pavlov 5y ago
Somebody should wrap this into a VGA-As-A-Service platform so that kids could learn programming the correct way:
mov ax, 13h
int 10h
- a-priori 5y agoThe assembly you’ve listed there assumes it runs in real mode and ring 0. You’d need to use virtualization of some kind to execute that.
- StillBored 5y agoWith a BIOS, or CSM on UEFI.
- deleted 5y ago[deleted]
- hoseja 5y agoThat's the only Holy way to run.
- zokier 5y agoDucktaping assembler into DOSBox Debugger would be interesting project, it provides almost whole UI otherwise by itself https://zwomp.com/index.php/2020/05/01/understanding-the-dosbox-debug-screen/ https://zwomp.com/index.php/2020/05/01/understanding-the-dos...
- dcveloper 5y agoI recently found some of my old Pascal mode 13h projects from when I was a teenager. Is DOSBox the best way to run those and Turbo Pascal?
- deleted 5y ago[deleted]
- kingcharles 5y agoI'm guessing you typed that from memory. What were you doing in the 90s? (demo coder, video game developer checking in here)
- enriquto 5y agoThese two lines are deeply ingrained in the minds of a whole generation of programmers. They start a graphics mode of size 320x200 with a 256 byte palette and you can start dumping your pixels in the 0xa0000 segment right away. I am yet to find a modern graphics programming environment that is so comfortable and easy to use as this.
- StillBored 5y agoWell your sorta comparing heavyweight OS graphics stack APIs with old school firmware ones. Even so, things like SDL2 are dead simple, one requests a window region and its possible to write bytes to the resulting buffer that show up in a window. That said modern firmware interfaces are still pretty clean. If you write a UEFI hello world, its possible to access the raw frame buffer with just a connection to the GOP, which is just a couple lines of code in C. Its conceptually pretty close to what your describing, except its designed to work with a slightly more modern programming paradigm. https://wiki.osdev.org/GOP https://wiki.osdev.org/GOP
- enriquto 5y agoI wouldn't call SDL2 "dead simple", unless sarcastically. Just opening an empty SDL window requires writing about 20 lines of code that deal with several different abstractions, a "window", a "surface", a "renderer, an "event". I only want an array of pixels that I can edit and see the results in realtime. It is of course possible to do that, but it seems ridiculously overcomplicated. I was taught as a kid to program simple graphical demos using peek and poke in basic. Then in assembler. In either case, stupid me got colored pixels on the screen after a few minutes of work. Kids these days, how do they start? Please, don't tell me "matplotlib" or I will cry myself to sleep.
- jmmv 5y agoNot exactly the same, but https://www.endbasic.dev/ https://www.endbasic.dev/ tries to achieve precisely that: a REPL with built in graphics for learning purposes, albeit with BASIC instead of asm.