Editor Navigation Keys p.1 - Amateur OS Dev (x86 asm)
Preventing non-hex digit input and adding left/right arrow and backspace keys in the hex editor, adding new move_cursor and print_char_text_mode files, and starting the text editor.
Note:
The audio is mixed and recorded worse for this, apologies. I got too annoyed at my pop filter to keep using it, but did order a windscreen (i.e. a foam cover) for the mic which should get here soon. I also set up the compressor filter in OBS after this video so mic audio should be somewhat better on the next one, less/no clipping at least.
Errata:
When checking for valid hex digits,
"cmp al, '9'; jg check_if_athruf; jmp convert_input"
this currently does not check for uppercase A-F as input by the user, it only checks for lowercase a-f. Just noticed this while reviewing the footage before uploading...D'oh!
Also this could be improved by changing to
"cmp al, '9'; jle convert_input"
No need for the extra jumps. Same for
"cmp al, 'F'; jg check_if_athruf; jmp convert_input"
should've used a "jle convert_input" instead.
Not sure why I thought backspace was "deleting" the current byte and moving back, it's supposed to be delete the previous byte and move back while moving all data after that 1 byte back. Maybe I'll do that for the text editor and/or fix this later.
The video timestamps feature looks really useful, I'll try to remember to add these from now on, as time/laziness permits. But it does add another $video_length amount of time to editing.
Video outline:
0:00 - Prevent non-hex digits in the hex editor
7:34 - Add file extension to bottom text string in editor
19:43 - Rationale for arrow key controls in hex editor
22:08 - Create move_cursor file, uses int 10h ah 02h
27:28 - Check for arrow keys using keyboard scancodes
32:35 - Left arrow key logic & debugging
47:03 - Change move_cursor to push cursor_x & cursor_y
50:04 - Right arrow key logic
52:47 - Create print_char_text_mode file / backspace key logic
1:05:11 - Debug backspace
1:10:59 - Start text editor / Print input bytes to screen
1:25:16 - Coming up / Outro
----------------------------------------------------------------------------------------------------------------------------------------
Playlist for this series:
https://www.youtube.com/playlist?list=PLT7NbkyNWaqajsw8Xh7SP9KJwjfpP8TNX
Git repos:
https://git.sr.ht/~queso_fuego/quesos
https://github.com/queso-fuego/amateuros
Software used:
VMware Workstation Player - https://www.vmware.com/products/workstation-player/workstation-player-evaluation.html
openBSD - https://www.openbsd.org/
qemu - https://www.qemu.org/
vim - https://www.vim.org/ (neovim is probably better :p)
fasm - https://flatassembler.net/
Suggest content you would like to see live, programming, gaming, or otherwise, through youtube comments, twitter, or by email.
Stream archive channel- https://www.youtube.com/channel/UCxi12g3jdQMFiFTA5GVcGMA
Contact:
email - fuegoqueso@gmail.com
twitter - @Queso_Fuego
Updates for this series might be tweeted out as they happen, if I remember (not likely). I'll probably use the YT channel community tab in the future for video/channel updates if requisite channel metrics are met. Though if people prefer, I can look into a mailing list for updates, or tweet out stuff anyway
Thoughts/Notes/Suggestions/Other - Drop a message in the video comments, by twitter, or by email
Credits:
Music from https://incompetech.com:
"Your Call" by Kevin MacLeod (https://incompetech.com)
Licence: CC BY (http://creativecommons.org/licenses/by/4.0/)
The blue title tags:
#osdev #programming #assembly