Click here to Skip to main content
15,745,574 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
My assignment is code a management battery laptop program by Assembly. But I don't know how to get information of battery in assembly. How can I do that. Please help me!!!

What I have tried:

I search in google so much but I don't find anything
Updated 26-Nov-22 12:12pm

Share this answer
Member 15493982 26-Nov-22 6:33am    
Can you explain how to use it? Please :(((
Richard MacCutchan 26-Nov-22 7:58am    
Sorry, this forum is for technical programming questions. If you want to learn how to use some feature of Windows then you need to study the documentation.
Member 15493982 26-Nov-22 9:11am    
:((, thanks for your help
I don't know if you can use this in assembler, but maybe it helps:[^]

// update:
You could call the command "powercfg /batteryreport" under Windows. This creates a file "battery-report.html". This file could be opened and the desired information could be read out. Why is the solution desired in assembler? In C, this could be done with a few lines of code. You can also instruct a C compiler to generate assembler if this is really necessary.

You can start a program with CreateProcess() and wait for its end with WaitForSingleObject().
Share this answer
Member 15493982 29-Nov-22 1:54am    
Thanks for your reply, but I don't know how to use this in assembler :(
merano99 29-Nov-22 16:02pm    
You can use CreateProcess(). See update.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900