interrupt

Audio interruption when iOS application is recording in background

痴心易碎 提交于 2020-01-10 15:35:14
问题 My iPad sound application (iOS 7.1) is able to record while in background. Everything is ok as far as recording is not interrupted while in background. For example if one's has the (stupid?) idea to start listening music while recording something. I tried to manage this interruption in different ways, with no success. The problem is that the - (void)audioRecorderEndInterruption:(AVAudioPlayer *)p withOptions:(NSUInteger)flags is never fired when application was in background as the

Assembly: [SI + CX] = impossible combination of address sizes

北战南征 提交于 2020-01-06 12:44:14
问题 So, today I tried to create a library for my in-development OS with one simple function: To print characters on screen. To use this function I simply have to push the string address to the stack and call it (The string must end with a 0x00 byte). Below is the source code of the function: __print: ;Print string that is terminated with a 0x00 to screen __print_prepare: pop si ;SI Register = String Address mov ah, 0x0E ;0x0E Function = Print Character on screen mov bx, 0x0F ;Background = Black,

Assembly: [SI + CX] = impossible combination of address sizes

巧了我就是萌 提交于 2020-01-06 12:43:11
问题 So, today I tried to create a library for my in-development OS with one simple function: To print characters on screen. To use this function I simply have to push the string address to the stack and call it (The string must end with a 0x00 byte). Below is the source code of the function: __print: ;Print string that is terminated with a 0x00 to screen __print_prepare: pop si ;SI Register = String Address mov ah, 0x0E ;0x0E Function = Print Character on screen mov bx, 0x0F ;Background = Black,

Can I make use of an interrupt to print a status while still continue process?

我只是一个虾纸丫 提交于 2020-01-06 07:58:13
问题 In python, is it possible to make use of KeyboardInterrupt or CTRL+C to print a status message, possibly like printing content of a variable and then continuing with the execution? Or will Interrupts always kill the process? An example of what I would like to do: def signal_handler(signum, frame): global interrupted interrupted = True while true: update(V) if interrupted: print V 回答1: You can do this using a signal handler: import signal def sigint_handler(signum, frame): print "my_variable =

Access to two variables safely when an interrupt might occur between them

最后都变了- 提交于 2020-01-06 03:01:08
问题 First of all I'd welcome edits to the title of this question, I couldn't think how to word it better but I'm not too happy with what I came up with. This is a question about concurrency, my application is on a microcontroller in C but I don't think that matters a great deal. I have an interrupt routine which can change the values of two global variables. I have some main code which can read those variables. But it must get get consistent values from both which means I can't read one and then

Access to two variables safely when an interrupt might occur between them

我与影子孤独终老i 提交于 2020-01-06 03:01:04
问题 First of all I'd welcome edits to the title of this question, I couldn't think how to word it better but I'm not too happy with what I came up with. This is a question about concurrency, my application is on a microcontroller in C but I don't think that matters a great deal. I have an interrupt routine which can change the values of two global variables. I have some main code which can read those variables. But it must get get consistent values from both which means I can't read one and then

BIOS interrupt replaced with far-call NOT working

瘦欲@ 提交于 2020-01-05 07:45:31
问题 Important Note: Code in this question can render media unbootable!! So I was trying for my stack to never overflow, but here I am with a question. I tried to do a far call to the interrupt vector table address for INT 0x13 (in my case 0000f000 at 0x4C) after I pushed flags, from a bootloader. Int 0x13 (that writes to disk 200h starting with 0x0 address) didn't work. This makes no sense as wiki says interrupts are interchangeable in real mode with far calls preceded by a flags push: https://en

Thread Interrupt in java

ⅰ亾dé卋堺 提交于 2020-01-04 05:11:24
问题 I have the following questions, if I interrupt a thread in java, a process that is running 15 minutes, it will stop the process, stop the methods or will finish this process,and not allow others continue in line? I have a "thread" that will call a method that will do a comparison based "access" and "postgres" after it will insert in postgres, if I want to stop the thread that called this action, she will succeed the stop the process, or wait they finish? 回答1: It will not stop the thread

Trying to understand asm interrupts, specifically 16h func 01H

烈酒焚心 提交于 2020-01-04 02:43:11
问题 THIS IS FOR HOMEWORK, I don't expect you to resolve my problem, just need some understanding... I have to work with ASM and C in a dosbox. My first problem is I don't really understand how to use bios interrupts (any good tutorial with code samples would be really appreciated), ok, I get there's interrupts, and each one has its own functions and parameters... Anyway I've tried...What I need to do is, theoretically, simple, I just need to get a character from keyboard and if it is a 1 or 0 key

What does “interrupt hooking” mean?

时光怂恿深爱的人放手 提交于 2020-01-03 21:48:50
问题 I'm reading the PnP BIOS specification and stumbled across the following paragraph: Actively monitor the INT 19h bootstrap vector The current System BIOS Architecture allows option ROMs to hook INT 19h indiscriminately. By actively monitoring control of INT 19h, the System BIOS may regain control of the Bootstrap process to ensure that the Operating System is loaded from the proper device and in the proper manner. On line 3, the possibility to "hook" an interrupt is mentioned. As far as I