flat assembler
Message board for the users of flat assembler.
Index
> Main > Output ONLY via ports Goto page 1, 2 Next |
Author |
|
kohlrak 04 Jul 2007, 05:19
Well, you're either going to beep your speaker, flash the screen, or flash the buttons on the keyboard last time i checked, but since the person will be using the computer, i think throwing something on the screen will be more obvious than anything, especially if they're def or if they can type without looking, though i have little experience with working with things outside of an os environment.
|
|||
04 Jul 2007, 05:19 |
|
DOS386 04 Jul 2007, 05:51
> Imagine you are in state when you can't use any BIOS, OS, or anything. Just plain port I/O
COOL. > What is easiest way to notice user using ports? I was thinking about PC-speaker YES. As long as your PC has one > Another possiblity was to set VGA text mode via registers (no int 10h), but i don't know how to do it Code exists, have seen it somewhere. Searched "OS construction" ? Dex4u or Bubach will have some _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
04 Jul 2007, 05:51 |
|
Dex4u 04 Jul 2007, 09:42
You can get info on seting VGA mode via in / out on bubach site here:
http://bos.asmhackers.net/docs/vga_without_bios/ You could also send debug info to com ports using in / out, If you have a floppy drive, you could do this: Code: ;====================================================;; Fdd motor off ;TURNS MOTOR AND LIGHT OFF . ;;====================================================;Fdd_motor_off: push edx push eax mov dx,0x3f2 mov al,0 out dx,al pop eax pop edx ret;====================================================;; Fdd Motor On ;TURNS MOTOR AND LIGHT ON ;;====================================================;FddMotorOn: push edx push eax mov dx,0x3f2 mov al,00011100b out dx,al pop eax pop edx ret Also if your in text mode you can print a number/letter without using bios or OS . |
|||
04 Jul 2007, 09:42 |
|
vid 04 Jul 2007, 10:28
i am in some highres graphic mode, without floppy
I will look at bubachs site about turning display to text mode. Didn't someone of you have some code to enter text mode via ports? I was also thinking about flashing LEDs, i know i did it in DOS and it was pretty simple. But i don't remember which ports to sue |
|||
04 Jul 2007, 10:28 |
|
kohlrak 04 Jul 2007, 11:10
I'd like to mention now that in and out aren't really documented much. They don't talk about which I/O port is connected to what, just that you can send or receive from a certain i/o port. They have documented a lot on interrupts, but i havn't seen much on commonly used I/O ports. Perhaps in answering vid some one could write or find some examples or documentation using these ports? Especially because some of us are probably afraid of accidentally writing to the HD.
|
|||
04 Jul 2007, 11:10 |
|
Dex4u 04 Jul 2007, 15:39
Here some keyboard led code, from DexOS
Code: ;some code mov [keyBoardStatus],7 ; set first 3bit to 1 for all leds on call SetKeyBoardLeds;some code;====================================================;; Set keyboard leds ;;====================================================;SetKeyBoardLeds: push eax mov al,0xed out 60h,alKeyBoardWait: in al,64h test al,10b jne KeyBoardWait mov al,byte [keyBoardStatus] and al,111b out 60h,al pop eax retkeyBoardStatus db 0 1 = scroll 4 = cap lock 2 = num 7 = all leds 0 = leds off |
|||
04 Jul 2007, 15:39 |
|
vid 04 Jul 2007, 18:15
Thanks a lot Dex
|
|||
04 Jul 2007, 18:15 |
|
handyman 04 Jul 2007, 23:32
kohlrak wrote:
Quote:
here is a downloadable port list I found that may help. http://bochs.sourceforge.net/techspec/PORTS.LST |
|||
04 Jul 2007, 23:32 |
|
hckr83 05 Jul 2007, 04:27
I have found some code for switching video only using ports...it was something by John Fine, I'll post it later if I can find it...
|
|||
05 Jul 2007, 04:27 |
|
f0dder 05 Jul 2007, 09:04
Ralph brown has a port list as well, iirc. And of course intel aren't documenting ports in their instruction list, since those are specific to the rest of the platform, not the CPU.
I wonder just how VGA compatible graphics cards are today, especially those in laptops... personally I'd flash the keyboard LEDs if I had a kernel in a panic state. |
|||
05 Jul 2007, 09:04 |
|
kohlrak 05 Jul 2007, 11:34
Quote: here is a downloadable port list I found that may help. Quite handy, handy man. Thank you. |
|||
05 Jul 2007, 11:34 |
|
El Tangas 05 Jul 2007, 18:16
Here is a link I found with info about the keyboard.
http://www.subfrequenz.net/linker/index.php?cat=26 If you had a floppy in the system, you could also spin the motor on and off as a diagnostic signal. |
|||
05 Jul 2007, 18:16 |
|
f0dder 06 Jul 2007, 10:42
El Tangas wrote:
Not a very good idea, imho... mechanical wear & tear, and if there's a floppy in the drive, you might end up trashing it? |
|||
06 Jul 2007, 10:42 |
|
El Tangas 06 Jul 2007, 15:33
f0dder wrote:
I don't think that turning the motor on and off would do any damage, but it would of course cause some wear. I wasn't recomending this, just reminding that the possibility exists... |
|||
06 Jul 2007, 15:33 |
|
vid 09 Jul 2007, 00:16
doesn't someone have some ready code that will beep PC speaker using ports? I found this link http://fly.cc.fer.hr/GDM/articles/sndmus/speaker1.html, but if someone happens to have tested code, please post it
|
|||
09 Jul 2007, 00:16 |
|
LocoDelAssembly 09 Jul 2007, 00:24
None of the PC Speaker examples at http://board.flatassembler.net/topic.php?t=2528 helps?
|
|||
09 Jul 2007, 00:24 |
|
vid 09 Jul 2007, 00:26
forgot about these, thanks
|
|||
09 Jul 2007, 00:26 |
|
vid 17 Jul 2007, 00:54
LED code, and PC speaker worked for me, thank you lot guys.
But now i moved to phase where i need text output. I found lot of useful code on bos.asmhackers, mostly all that i need: setting up text mode, and setting up font. I will start in Windows environment, i will completely disable rest of windows from driver, and continue only with my code. I plan to switch display to text mode, and print few messages. I just want to make sure there aren't any other problems about doing this... |
|||
17 Jul 2007, 00:54 |
|
DJ Mauretto 17 Jul 2007, 09:26
Hi Vid
simply set 80*25 text mode from dosbox under windows and read all vga register , next to set 80*25 text mode write same value to vga.. this is valid for every vga mode. don't waste your time to search stupid source ,asm programmer is first of all a hacker. Have fun |
|||
17 Jul 2007, 09:26 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.