You can post the code, only to see, because i need to see your code to solve your problem.
You can post the code, only to see, because i need to see your code to solve your problem.
In your case i will use Delphi, with the Multi-Media Player component, that you can play, pause, stop, FF, FW, also in movies...
And for the lyrics that you want to play(i understand this) you can use a Timer to put the in a TextBox or something else.
Hello,
I'm beginning in the OS development(In Assembly, Nasm as Assembler) and i need to implement a command-line on it, but i don't know how to do this, but what i want to say as command-line is like MS-DOS or UNIX:
> ver
BerlOS v.0.0.1
> _
But i don't know how to do the input method(ver in the command). In the repetition of the >
before the user input things i know, i only need to do a JMP to the section that prints the >
and the input method, if it's needed, here is my code:
[BITS 16] ; 16 bit code generation
[ORG 0x7C00] ; ORGin location is 7C00
JMP short main ; Jump past disk description section
NOP ; Pad out before disk description
; ------------------------------------------------------------------
; Disk description table, to make it a valid floppy
; Note: some of these values are hard-coded in the source!
; Values are those used by IBM for 1.44 MB, 3.5" diskette
OEMLabel db "BERL OS" ; Disk label - 8 chars
BytesPerSector dw 512 ; Bytes per sector
SectorsPerCluster db 1 ; Sectors per cluster
ReservedForBoot dw 1 ; Reserved sectors for boot record
NumberOfFats db 2 ; Number of copies of the FAT
RootDirEntries dw 224 ; Number of entries in root dir
LogicalSectors dw 2880 ; Number of logical sectors
MediumByte db 0F0h ; Medium descriptor byte
SectorsPerFat dw 9 ; Sectors per FAT
SectorsPerTrack dw 18 ; Sectors per track (36/cylinder)
Sides dw 2 …
Hello,
I'm trying to write my OS to an floppy disk, but when i try to boot up, Bochs says that i don't have any OS on that floppy, here is the command that i'm using to write:
#1 Try:
C:\Assembly> DEBUG os.asm
-w 100 0 0 1
-q
#2 Try:
C:\Assembly> DEBUG os.bin
-w 100 0 0 1
-q
Here is my source code:
[BITS 16] ; 16 bit code generation
[ORG 0x7C00] ; ORGin location is 7C00
JMP short main ; Jump past disk description section
NOP ; Pad out before disk description
; ------------------------------------------------------------------
; Disk description table, to make it a valid floppy
; Note: some of these values are hard-coded in the source!
; Values are those used by IBM for 1.44 MB, 3.5" diskette
OEMLabel db "BERL OS" ; Disk label - 8 chars
BytesPerSector dw 512 ; Bytes per sector
SectorsPerCluster db 1 ; Sectors per cluster
ReservedForBoot dw 1 ; Reserved sectors for boot record
NumberOfFats db 2 ; Number of copies of the FAT
RootDirEntries dw 224 ; Number of entries in root dir
LogicalSectors dw 2880 ; Number of logical sectors
MediumByte db 0F0h ; Medium descriptor byte
SectorsPerFat dw 9 ; Sectors per FAT
SectorsPerTrack dw 18 ; Sectors per track (36/cylinder)
Sides dw 2 ; Number of sides/heads
HiddenSectors dd 0 ; Number of hidden sectors
LargeSectors dd 0 ; Number of LBA sectors
DriveNo dw 0 ; Drive No: 0
Signature db 41 ; Drive …
Hello,
I'm starting on Assembly and i want to know how i can clear the screen in Assembly, because of my OS. When i run it in Bochs, that boot messages are there and i want to clear they, for a better visual of my OS.
Thanks,
Nathan Paulino Campos
Hello,
I'm learning Assembly and i want to know the tools that the other persons use to develop, things like: Nasm, emu8086, WinHex...
All the things that you use that are related with Assembly and what the do. Only for improve my tools and my learning.
Thanks,
Nathan Paulino Campos
Ok, sorry about my suggestion!
Now i know, like 42, in hexamal it will be 2A and the calc is this: 42 = 16 * 2 + 10
, because 42 was divided by 16 with the quotient 2 and the remainder is 10, the it will be 2A.
Thanks for Jester01 in the ##asm channel of FreeNode that helped me with this!
And i want to know how to calculate this using a calculator.
Thanks!
H = 15
, why the h after all the numbers that you have entered in the beginning of your answer?
Why 36 and 33?
Thanks!
Hello,
I'm starting in Assembly development. Then recently i buy a book of Assembly, in it i have the table with the decimal numbers to hexamals and to binarys, like this:
Dec - Hex
1 - 01
2 - 02
3 - 03
4 - 04
[...]
10 - A
11 - B
12 - C
13 - D
14 - E
15 - F
And at thee appendix of the book i have the conversions of all the numbers and ASCII to hexamal and to binary, but i want to know what is the calc to convert decimal numbers in hexamal, like 63 = 3F
, what is the calc that i have to do to tranform 63 in hexamal that is 3F, this is just to learn more.
Thanks,
Nathan Paulino Campos
I didn't understand what you want to say, you can be more specific and if you can you can give me a sample snippet.
Thanks!
Thanks very much!
Hello,
I'm learning Aseembly and i want to know how i can adaptate this line: times 510-($-$$) db 0
for run it in emu8086.
Thanks,
Nathan Paulino Campos
Hello,
I'm learning Assembly and every time that i ask something here in this forum of Assembly the person that reply me is @wildgoose, that is a person that answer to you with respect, gently and much of learned things in Assembly, because of this things and many others i will like very much if @wildgoose be promoted to moderator of the Assembly forum.
Thanks,
Nathan Paulino Campos
Ok, thanks for the answer.
If you want you can help me with this: http://www.daniweb.com/forums/thread213125.html
If you can i will be very happy!
Thanks!
Hello,
I want to write a *.bin(Assembly compiled file) to an floppy drive, but i don't know how to do this, remember that i have to write to the cylinder 0, head 0 and sector 1, because it's an boot program, only if needed here is the code:
; directive to create BOOT file:
#make_boot#
; Boot record is loaded at 0000:7C00,
; so inform compiler to make required
; corrections:
ORG 7C00h
PUSH CS ; make sure DS=CS
POP DS
; load message address into SI register:
LEA SI, msg
; teletype function id:
MOV AH, 0Eh
print: MOV AL, [SI]
CMP AL, 0
JZ done
INT 10h ; print using teletype.
INC SI
JMP print
; wait for 'any key':
done: MOV AH, 0
INT 16h
; store magic value at 0040h:0072h:
; 0000h - cold boot.
; 1234h - warm boot.
MOV AX, 0040h
MOV DS, AX
MOV w.[0072h], 0000h ; cold boot.
JMP 0FFFFh:0000h ; reboot!
new_line EQU 13, 10
msg DB 'Hello This is My First Boot Program!'
DB new_line, 'Press any key to reboot', 0
Thanks,
Nathan Paulino Campos
It's only to get more answers, because if you post in more sites you have more chances to get an answer, but if you dislike i don't post more in the other sites, only here.
Thanks very much, now i can continue learning!
Hello,
I'm beginning in Assembly development. When i try to print a word using the variable type DB with the name message, but when i try to execute this program, emu8086 only show me a dialog, not the message, here is an screenshot: http://xs142.xs.to/xs142/09345/imagem568.png
#make_COM#
ORG 100h ; COM file is loaded at CS:0100h
MOV AH, 09h
LEA DX, mensagem
INT 21h
INT 20h
message DB "Test!"
What i have to change in my code?
Thanks,
Nathan Paulino Campos
Please of better titles, not things like: HELP, Error, help with..., but your problem in the title, just to be better for the other users.
Thanks!
Thanks, this was just for my knowleadge as a beginner.
+1 of reputation!
Thanks, now it is working!
But i'm starting, then i want to know what program you use, if you can share i will be very happy.
+1 of Reputation
Hello Wildgoose,
Here is an screenshot:
[img]http://img24.imageshack.us/img24/2298/14629076.jpg[/img]
Please put what i have to change in my code to do this work.
Thanks,
Nathan Paulino Campos
Hello,
I'm learning Assembly. I'm using DEBUG as my Assembler, but now i want to convert a simple code to really Assembly(For emu8086), here is the code as i put in DEBUG:
-E 0200 "0123456789" 24
-A 0100
0D0B:0100 MOV AH,09
0D0B:0102 MOV DX,0200
0D0B:0105 INT 21
0D0B:0107 INT 20
But when i put this code in emu8086 and i try to emulate it, the program gave me two errors.
What i have to do?
Thanks,
Nathan Paulino Campos
OK, thanks!
Hello,
I'm a Java developer, but now i'm learning PLT Scheme language and here in DaniWeb we don't have an forum for this language, then if the administrators of this very big and good community add this language to the board i will be very happy.
Thanks,
Nathan Paulino Campos
PHP is the better thing for this.
Hello,
I'm a Java developer and i have created a forum in InvisionFree, that uses a Invision Power Board, but i want to index my forum to Google, how i can do this, remember that my account is free, then i can't upload files for the root of my forum.
Thanks,
Nathan Paulino Campos
Hello,
I'm really starting in Assembly, but i want to know if it's possible to develop for ARM devices like those who run Windows CE, because i have an Jornada 720 and i want to develop to it, i'm already a Java developer, but Assembly will be another language that i want to learn.
Thanks,
Nathan Paulino Campos
Thanks, i'm going to study!!!
Hello,
I'm a Java developer, but only for curiosity i want to learn Assembly, someone can post some good resources to begin.
Thanks,
Nathan Paulino Campos
Please don't put titles like this!
Put something like: Error in..., Help in...
Thanks!
Please help me with this!!!
The application that i'm developing is a simple contact book and if you didn't understand very nice my previous post, i need to change my code, in the list registry's form an option that the user can select a contact, click in a Command and it redirect the user to another form that he can see the full details about that contact that he selected, like name, telephone and type.
Thanks!
Please, remember to use code, quote or icode tags to files, code, errors, logs and other things, because the post get better visually.
Thanks!
Thanks for the very nice tip!
Hello,
I'm learning Java ME, remember that i'm already a Java developer, but i want to create another form to show all the details of the contact, like that of the contact book of the cell phones, here is my code:
package contacts;
import java.io.*;
import java.util.Vector;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.rms.*;
import javax.microedition.lcdui.*;
public class simplecontacts extends MIDlet implements CommandListener {
private Display display;
private Alert alerta;
private Form initialScreen, addReg;
private TextField name, telefone;
private Command exit, add, back, save, clear;
private RecordStore rs = null;
String type, message;
boolean recordOK = false;
private ChoiceGroup contact_type;
private String[] listType = {"Amigos", "Família", "Trabalho", "Teste"};
private Form listReg;
private Command list, delete, ord, filter;
private ChoiceGroup listRegistrys;
boolean deletedFlags[] = null;
private Vector vecNames;
public simplecontacts() {
display = Display.getDisplay(this);
exit = new Command("Exit", Command.EXIT, 0);
add = new Command("Add Registrys", Command.SCREEN, 1);
clear = new Command("Clear Registrys", Command.SCREEN, 1);
back = new Command("Back", Command.SCREEN, 1);
save = new Command("Save Registry", Command.SCREEN, 1);
name = new TextField("Name:", "", 20, TextField.ANY);
telefone = new TextField("Telefone:", "", 10, TextField.PHONENUMBER);
list = new Command("List Registrys", Command.SCREEN, 1);
listRegistrys = new ChoiceGroup("Registrys", ChoiceGroup.MULTIPLE);
vecNames = new Vector();
delete = new Command("Delete Registrys", Command.SCREEN, 1);
ord = new Command("Order Registrys", Command.SCREEN, 1);
filter = new Command("Filter Registrys", Command.SCREEN, 1);
initialScreen = new Form("Simple Contacts");
initialScreen.addCommand(exit);
initialScreen.addCommand(add);
initialScreen.addCommand(clear);
initialScreen.addCommand(list);
initialScreen.addCommand(ord);
initialScreen.addCommand(filter);
initialScreen.addCommand(clear);
initialScreen.setCommandListener(this);
addReg = new Form("Add Contact");
contact_type = new ChoiceGroup("Types", Choice.POPUP, listType, null);
addReg.append(name);
addReg.append(telefone);
addReg.append(contact_type);
addReg.addCommand(save);
addReg.addCommand(back);
addReg.setCommandListener(this);
listReg = …
Thanks very much Peter!
+1 of reputation!
Remember that the alert of Try Again is occurring when i use length() instead of size().
Thanks Peter, but now i have an error in my code, it says this, in Eclipse:
The method size() is undefined for the type String
Here is the code:
public void itemStateChanged (Item item) {
if (item instanceof TextField) {
String teste = ((TextField)item).getString();
if (teste.size() > 0) {
recordOK = true;
}
}
Thanks!
Hello Peter,
Now i've translated all the code to english, except the error messages, but the error message that shows me every time i've translated it, it is in the line 207, here is the code:
package contacts;
import java.io.*;
import java.util.Vector;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.rms.*;
import javax.microedition.lcdui.*;
public class simplecontacts extends MIDlet implements CommandListener, ItemStateListener {
private Display display;
private Alert alerta;
private Form initialScreen, addReg;
private TextField name, telefone;
private Command exit, add, back, save, clear;
private RecordStore rs = null;
String type, message;
boolean recordOK = false;
private ChoiceGroup contact_type;
private String[] listType = {"Amigos", "Família", "Trabalho", "Teste"};
private Form listReg;
private Command list, delete, ord, filter;
private ChoiceGroup listRegistrys;
boolean deletedFlags[] = null;
private Vector vecNames;
public simplecontacts() {
display = Display.getDisplay(this);
exit = new Command("Exit", Command.EXIT, 0);
add = new Command("Add Registrys", Command.SCREEN, 1);
clear = new Command("Clear Registrys", Command.SCREEN, 1);
back = new Command("Back", Command.SCREEN, 1);
save = new Command("Save Registry", Command.SCREEN, 1);
name = new TextField("Name:", "", 20, TextField.ANY);
telefone = new TextField("Telefone:", "", 10, TextField.PHONENUMBER);
list = new Command("List Registrys", Command.SCREEN, 1);
listRegistrys = new ChoiceGroup("Registrys", ChoiceGroup.MULTIPLE);
vecNames = new Vector();
delete = new Command("Delete Registrys", Command.SCREEN, 1);
ord = new Command("Order Registrys", Command.SCREEN, 1);
filter = new Command("Filter Registrys", Command.SCREEN, 1);
initialScreen = new Form("Simple Contacts");
initialScreen.addCommand(exit);
initialScreen.addCommand(add);
initialScreen.addCommand(clear);
initialScreen.addCommand(list);
initialScreen.addCommand(ord);
initialScreen.addCommand(filter);
initialScreen.addCommand(clear);
initialScreen.setCommandListener(this);
addReg = new Form("Add Contact");
contact_type = new ChoiceGroup("Types", Choice.POPUP, listType, null);
addReg.append(name);
addReg.append(telefone);
addReg.append(contact_type);
addReg.addCommand(save);
addReg.addCommand(back);
addReg.setCommandListener(this);
listReg = new Form("");
listReg.append(listRegistrys);
listReg.addCommand(delete); …
Hello Peter,
It's portuguese, because i'm from Brazil, i'm going to translate all the program if it's more simple to you.
Thanks,
Nathan Paulino Campos
Hello,
I'm learning Java ME, remember that i'm already a Java developer, but i was trying to do a simple contact book application, then when it was finished i run it in the WTK emulator, but when i try to add some record it only shows me the message that i didn't wrote anything in the fields, but i wrote!, here is the GIF of the message:
http://users.cjb.net/windows-ce/wtk-bug.gif
And here is my code:
package contacts;
import java.io.*;
import java.util.Vector;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.rms.*;
import javax.microedition.lcdui.*;
public class simplecontacts extends MIDlet implements CommandListener, ItemStateListener {
private Display display;
private Alert alerta;
private Form telainicial, adicionaReg;
private TextField nome, telefone;
private Command sair, adicionar, voltar, salvar, zerar;
private RecordStore rs = null;
String tipo, mensagem;
boolean gravacaoOK = false;
private ChoiceGroup tipo_contato;
private String[] listaTipo = {"Amigos", "Família", "Trabalho", "Teste"};
private Form listagemReg;
private Command listar, apagar, ordenar, filtrar;
private ChoiceGroup listaRegistros;
boolean deletedFlags[] = null;
private Vector vecNomes;
public simplecontacts() {
display = Display.getDisplay(this);
sair = new Command("Sair", Command.EXIT, 0);
adicionar = new Command("Adicionar Registros", Command.SCREEN, 1);
zerar = new Command("Zerar Registros", Command.SCREEN, 1);
voltar = new Command("Voltar", Command.SCREEN, 1);
salvar = new Command("Salvar Registro", Command.SCREEN, 1);
nome = new TextField("Nome:", "", 20, TextField.ANY);
telefone = new TextField("Telefone:", "", 10, TextField.PHONENUMBER);
listar = new Command("Listar Registros", Command.SCREEN, 1);
listaRegistros = new ChoiceGroup("Registros", ChoiceGroup.MULTIPLE);
vecNomes = new Vector();
apagar = new Command("Apagar Registros", Command.SCREEN, 1);
ordenar = new Command("Ordenar Registros", Command.SCREEN, 1);
filtrar = new Command("Filtrar …
Thanks very much!!!!!!!!
Now i can continue developing my project!!!!!!!!!!!!
Thanks very very much my friend!!!
You can develop an RPG game, like Runescape or Warcraft, i'm going to try your project!
Hello,
I'm learning Java ME and i was building an application that is a simple contact book, but in the main form it only have menus, because i don't know how i can list the registry's on it, remember that i want to list only the names in the list and how i can add more registry's, not overwrite the existing one. Here is my code:
package contacts;
import java.io.*;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.rms.*;
import javax.microedition.lcdui.*;
public class simplecontacts extends MIDlet implements CommandListener, ItemStateListener {
private Display display;
private Alert alerta;
private Form telainicial, adicionaReg;
private TextField nome, telefone;
private Command sair, adicionar, voltar, salvar, zerar;
private RecordStore rs = null;
String tipo, mensagem;
boolean gravacaoOK = false;
private ChoiceGroup tipo_contato;
private String[] listaTipo = {"Amigos", "Família", "Trabalho"};
public simplecontacts() {
display = Display.getDisplay(this);
sair = new Command("Sair", Command.EXIT, 0);
adicionar = new Command("Adicionar Registros", Command.SCREEN, 1);
zerar = new Command("Zerar Registros", Command.SCREEN, 1);
voltar = new Command("Voltar", Command.SCREEN, 1);
salvar = new Command("Salvar Registro", Command.SCREEN, 1);
nome = new TextField("Nome:", "", 20, TextField.ANY);
telefone = new TextField("Telefone:", "", 10, TextField.PHONENUMBER);
telainicial = new Form("Simple Contacts");
telainicial.addCommand(sair);
telainicial.addCommand(adicionar);
telainicial.addCommand(zerar);
telainicial.setCommandListener(this);
adicionaReg = new Form("Adiciona Contato");
tipo_contato = new ChoiceGroup("Tipo do Contato", Choice.POPUP, listaTipo, null);
adicionaReg.append(nome);
adicionaReg.append(telefone);
adicionaReg.append(tipo_contato);
adicionaReg.addCommand(salvar);
adicionaReg.addCommand(voltar);
adicionaReg.setItemStateListener(this);
adicionaReg.setCommandListener(this);
}
protected void destroyApp(boolean arg0) {
notifyDestroyed();
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
protected void startApp() throws MIDletStateChangeException {
try {
rs = RecordStore.openRecordStore("SimpleContacts", true);
} catch (Exception exc) {
mostrarAlerta("Erro …